Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
御承扬
WebCourse
提交
9c77e694
W
WebCourse
项目概览
御承扬
/
WebCourse
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
WebCourse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9c77e694
编写于
4月 07, 2020
作者:
7
7wc98#14
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update
上级
c75de5fd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
77 addition
and
0 deletion
+77
-0
src/main/resources/static/js/one.js
src/main/resources/static/js/one.js
+3
-0
src/main/resources/templates/Buju.html
src/main/resources/templates/Buju.html
+1
-0
src/main/resources/templates/Person.html
src/main/resources/templates/Person.html
+1
-0
src/main/resources/templates/test4.html
src/main/resources/templates/test4.html
+1
-0
src/main/resources/templates/useJavascript.html
src/main/resources/templates/useJavascript.html
+71
-0
未找到文件。
src/main/resources/static/js/one.js
0 → 100644
浏览文件 @
9c77e694
function
f3
()
{
document
.
getElementById
(
"
t1
"
).
innerHTML
=
"
这里是外部JS代码
"
;
}
\ No newline at end of file
src/main/resources/templates/Buju.html
浏览文件 @
9c77e694
...
...
@@ -24,6 +24,7 @@
<a
href=
"Person.html"
>
个人页
</a>
<a
href=
"#"
class=
"active"
>
页面布局
</a>
<a
href=
"test4.html"
>
圆角和阴影
</a>
<a
href=
"useJavascript.html"
>
Javascript1
</a>
</div>
<div
id=
"main"
>
<div
id=
"lp"
class=
"aside"
>
...
...
src/main/resources/templates/Person.html
浏览文件 @
9c77e694
...
...
@@ -183,6 +183,7 @@
<li><a
href=
"Home.html"
>
家乡介绍
</a></li>
<li
class=
"active"
><a
href=
"Person.html"
>
个人介绍
</a></li>
<li><a
href=
"Buju.html"
>
页面布局
</a></li>
</ul>
</div>
</div>
...
...
src/main/resources/templates/test4.html
浏览文件 @
9c77e694
...
...
@@ -95,6 +95,7 @@
<a
href=
"Person.html"
>
个人页
</a>
<a
href=
"Buju.html"
>
页面布局
</a>
<a
href=
"#"
class=
"active"
>
圆角和阴影
</a>
<a
href=
"useJavascript.html"
>
Javascript1
</a>
</div>
<div
id=
"main"
>
<div
id=
"lp"
class=
"aside"
>
...
...
src/main/resources/templates/useJavascript.html
0 → 100644
浏览文件 @
9c77e694
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
页面布局
</title>
<link
rel=
"stylesheet"
href=
"../static/css/buju.css"
>
<style
type=
"text/css"
>
.active
{
color
:
blue
;
}
.cen
{
margin
:
25%
auto
;
}
button
{
width
:
150px
;
height
:
50px
;
background-color
:
#b8daff
;
}
</style>
<script>
function
f1
()
{
alert
(
"
head标签内嵌脚本
"
);
}
</script>
</head>
<body>
<div
id=
"container"
>
<div
id=
"header"
>
<div
style=
"margin-top: 10px;padding-top:30px; "
>
<h1
style=
"color: red;"
>
Web 课实验·Javascript使用方式
</h1>
</div>
</div>
<div
id=
"nav"
>
<a
href=
"Home.html"
>
御承扬
</a>
<a
href=
"Home.html"
>
首页
</a>
<a
href=
"Person.html"
>
个人页
</a>
<a
href=
"Buju.html"
>
页面布局
</a>
<a
href=
"test4.html"
>
圆角和阴影
</a>
<a
href=
"#"
class=
"active"
>
Javascript1
</a>
</div>
<div
id=
"main"
>
<div
id=
"lp"
class=
"aside"
>
<p
id=
"ap"
>
点击下面按钮,会调用在行内Javascript脚本修改本段落内容。
</p><br>
<button
onclick=
"document.getElementById('ap').innerHTML='这里是在行内Javascript'"
>
行内JS
</button>
</div>
<div
id=
"content"
>
<div
class=
"cen"
>
<h1>
点击下面按钮调用head标签内的Javascript脚本
</h1><br>
<button
onclick=
"f1()"
>
嵌套JS
</button>
</div>
</div>
<div
id=
"rp"
class=
"aside"
>
<p
id=
"t1"
>
点击下面的按钮,会调用外部JS改变本段落内容。
</p><br>
<script
src=
"../static/js/one.js"
></script>
<button
onclick=
"f3()"
>
外部JS
</button>
</div>
</div>
<div
id=
"footer"
>
<div
style=
"margin-top: 10px;padding-top: 50px;"
>
<h1
style=
"color: #f8f8f8"
>
Copyright
<strong>
©
彭友聪
</strong>
201724073161
</h1>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录