+ 点击下面按钮调用head标签内的Javascript脚本 +
+ +
diff --git a/src/main/resources/static/js/one.js b/src/main/resources/static/js/one.js new file mode 100644 index 0000000000000000000000000000000000000000..412bb6d8b3ce37091eb2859d8b80010f1b0ad406 --- /dev/null +++ b/src/main/resources/static/js/one.js @@ -0,0 +1,3 @@ +function f3() { + document.getElementById("t1").innerHTML="这里是外部JS代码"; +} \ No newline at end of file diff --git a/src/main/resources/templates/Buju.html b/src/main/resources/templates/Buju.html index 2e9b51db95de73875ea92466668b86646695e755..5dcee240289738c210b1a6daf9d11dae925b523d 100644 --- a/src/main/resources/templates/Buju.html +++ b/src/main/resources/templates/Buju.html @@ -24,6 +24,7 @@ 个人页 页面布局 圆角和阴影 + Javascript1
+ 点击下面按钮,会调用在行内Javascript脚本修改本段落内容。 +
+ 点击下面的按钮,会调用外部JS改变本段落内容。 +