Skip to content

Commit 6bf103c

Browse files
authored
Add files via upload
update java8 code
1 parent 9d94cc1 commit 6bf103c

File tree

7 files changed

+138
-0
lines changed

7 files changed

+138
-0
lines changed

jquery/W3C/Window/index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Window对象</title>
6+
</head>
7+
<body>
8+
<p id="demo"></p>
9+
<script>
10+
var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
11+
var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
12+
13+
x = document.getElementById('demo');
14+
x.innerHTML = '浏览器内部的窗口宽度:' + w + ",高度:" + h + " . ";
15+
</script>
16+
17+
</body>
18+
</html>

jquery/W3C/Window/index2.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title</title>
6+
</head>
7+
<body>
8+
<script>
9+
document.write("可用宽度:" + screen.availWidth);
10+
11+
document.write("可用高度:" + screen.availHeight);
12+
13+
14+
</script>
15+
16+
17+
</body>
18+
</html>

jquery/W3C/Window/index3.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title</title>
6+
<script>
7+
function newDoc() {
8+
window.location.assign("http://www.w3school.com.cn");
9+
}
10+
</script>
11+
12+
13+
</head>
14+
<body>
15+
<script>
16+
document.write(location.href);
17+
document.write("<br/>");
18+
document.write(location.pathname);
19+
</script>
20+
<br/>
21+
<input type="button" onclick="newDoc()" value="加载新文档">
22+
23+
</body>
24+
</html>

jquery/W3C/Window/index4.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title</title>
6+
<script>
7+
function goBack() {
8+
window.history.back();
9+
}
10+
</script>
11+
<script>
12+
function goForward() {
13+
window.history.forward();
14+
}
15+
</script>
16+
17+
</head>
18+
<body>
19+
<input type="button" value="goBack" onclick="goBack()"/>
20+
<br/>
21+
<input type="button" value="Forward" onclick="goForward()"/>
22+
23+
</body>
24+
</html>

jquery/W3C/Window/index5.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title</title>
6+
</head>
7+
<body>
8+
<div id="example"></div>
9+
<script>
10+
txt = "<p> Browser CodeName:" + navigator.appCodeName + "</p>";
11+
txt += "<p> Browser Name:" + navigator.appName + "</p>";
12+
txt += "<p> Browser Version:" + navigator.appVersion + "</p>";
13+
txt += "<p> Cookies Enabled:" + navigator.cookieEnabled + "</p>";
14+
txt += "<p>User-agent header:" + navigator.userAgent + "</p>";
15+
txt += "<p> >User-agent language:" + navigator.systemLanguage + "</p>";
16+
document.getElementById("example").innerHTML = txt;
17+
18+
</script>
19+
20+
21+
</body>
22+
</html>

jquery/W3C/Window/index6.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title</title>
6+
</head>
7+
<body>
8+
<script>
9+
alert("文本框!");
10+
confirm("文本框!");
11+
12+
</script>
13+
14+
15+
</body>
16+
</html>

jquery/W3C/Window/index7.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title</title>
6+
</head>
7+
<body>
8+
<script>
9+
function timedMsg() {
10+
var t = setTimeout("alert('5 seconds!')", 5000);
11+
}
12+
13+
</script>
14+
<input type="button" value="Display timed alertbox!" onclick="timedMsg()"/>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)