Skip to content

Commit 61ea206

Browse files
committed
init
1 parent 742ec05 commit 61ea206

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1904
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>HTMLPage3.html</title>
5+
6+
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
7+
<meta http-equiv="description" content="this is my page">
8+
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
9+
10+
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
11+
12+
<link rel="stylesheet" href="my3.css" type="text/css"></link>
13+
</head>
14+
15+
<body>
16+
<!-- 下面是在行内元素里面容纳块元素的实验 -->
17+
<span class="s1">span1 he<div class="s2">aaa</div>llo word</span>
18+
<div class="s2"> div1</div>
19+
<div class="s2"> div2<div class="s4">div3</div></div>
20+
<span class="s1">okok</span>
21+
<p class="s3">p1</p>
22+
23+
</body>
24+
</html>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>HtmlPage1.html</title>
5+
6+
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
7+
<meta http-equiv="description" content="this is my page">
8+
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
9+
10+
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
11+
<link rel="stylesheet" href="htmlpage1.css" type="text/css"></link>
12+
</head>
13+
14+
<body>
15+
这里是北极
16+
<span class="style1" id="special_new">新闻1</span>
17+
<span class="style1">新闻2</span>
18+
<span class="style1 style4" >新闻3</span>
19+
<span class="style1">新闻4</span>
20+
<span class="style1">新闻5</span>
21+
<br/>
22+
<span id="style2">这是一则<span><span></span></span>的新闻</span>
23+
<br/>
24+
<a href="#">goto sohu</a><br/>
25+
<a href="#">goto sina</a><br/>
26+
</body>
27+
</html>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
Class-Path:
3+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app version="2.5"
3+
xmlns="http://java.sun.com/xml/ns/javaee"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
6+
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
7+
<welcome-file-list>
8+
<welcome-file>index.jsp</welcome-file>
9+
</welcome-file-list>
10+
</web-app>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>a.html</title>
5+
6+
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
7+
<meta http-equiv="description" content="this is my page">
8+
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
9+
10+
<script language="javascript" type="text/javascript">
11+
</script>
12+
</head>
13+
<body>
14+
<a href="b.html">goto b</a>
15+
</body>
16+
</html>
2.84 KB
Loading
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>array1.html</title>
5+
6+
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
7+
<meta http-equiv="description" content="this is my page">
8+
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
9+
10+
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
11+
12+
</head>
13+
14+
<body>
15+
<script language="javascript" type="text/javascript">
16+
var weigths = [1,2,42,2,,53,2,34,53,5];
17+
var all_weight =0;
18+
var avg_weight =0;
19+
/*
20+
for(var i=0; i<weights.length;i++)
21+
{
22+
//document.writeln(weights[i]+" ");
23+
all_weight + = weights[i];
24+
}
25+
avg_weight = all_weight/weights.length;
26+
27+
document.writeln("总体重是 "+ all_weight + "平均体重是" + avg_weight.toFixed(2));
28+
*/
29+
/*
30+
arr=[45,90,0];
31+
arr['gg'] = 9000;
32+
for(var key in arr)
33+
{
34+
window.alert(key +" = " + arr[key])
35+
}
36+
*/
37+
/*
38+
var arr =[["shoping",123,4.5],["a","b","c"],[23,5]]
39+
for(var i=0;i<arr.length;i++)
40+
{
41+
for(var j=0;j<arr[i].length;j++)
42+
document.writeln(arr[i][j]+"&nbsp;");
43+
document.writeln("<br/>")
44+
}
45+
*/
46+
47+
/*
48+
//冒泡排序算法
49+
var arr = [5,0,-56,54,234,54,-53,53,-4,53]
50+
var flag =false;
51+
for(var i=0;i<arr.length-1;i++)
52+
{
53+
for(var j=0;j<arr.length-1-i;j++)
54+
if(arr[j]>arr[j+1])
55+
{
56+
var temp =arr[j];
57+
arr[j] = arr[j+1];
58+
arr[j+1] = temp;
59+
flag =true;
60+
}
61+
if(flag)
62+
{
63+
flag=false;
64+
}
65+
else
66+
{
67+
break;
68+
}
69+
}
70+
71+
for(var i=0;i<arr.length;i++)
72+
{
73+
document.writeln(arr[i]+"&nbsp;");
74+
}
75+
*/
76+
77+
//二分查找
78+
//找到数组的中间数,和你要查找的数比较,如果midval>findVal,则findVal在数组的左边,则只在左边查找,反之右边。
79+
var arr = [-13,-5,-2,0,4,6,87,98,123,124,654]
80+
function binarysearch(arr,findVal,leftIndex,rightIndex)
81+
{
82+
//找到中间那个值 地板除
83+
var midIndex = Math.floor((leftIndex + rightIndex)/2);
84+
var midVal = arr[midIndex];
85+
//防止无穷递归。
86+
if(leftIndex>rightIndex)
87+
{
88+
document.writeln("找不到"+"<br/>");
89+
return;
90+
}
91+
if(midVal >findVal)
92+
{
93+
binarysearch(arr,findVal,leftIndex,midIndex-1);
94+
}
95+
else
96+
{
97+
if(midVal < findVal)
98+
{
99+
binarysearch(arr,findVal,midIndex+1,rightIndex);
100+
}else
101+
{
102+
document.writeln("找到了,下标"+midIndex+"<br/>");
103+
return;
104+
}
105+
}
106+
}
107+
binarysearch(arr,2,0,arr.length-1);
108+
binarysearch(arr,0,0,arr.length-1);
109+
binarysearch(arr,87,0,arr.length-1);
110+
//测试。
111+
</script>
112+
</body>
113+
</html>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>array2.html</title>
5+
6+
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
7+
<meta http-equiv="description" content="this is my page">
8+
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
9+
10+
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
11+
12+
</head>
13+
14+
<body>
15+
<script language="javascript" type="text/javascript">
16+
var arr=[[21,34,545,656],[23,76,-78,76],[2,3,43,22]];
17+
//定义一个新数组
18+
var arr2 = [];
19+
//初始化,定下有多少行
20+
for(var i=0;i<arr[0].length;i++)
21+
{
22+
arr2[i]=[];
23+
}
24+
//遍历旧数组
25+
for(var i=0;i<arr.length;i++)
26+
{
27+
for(var j=0;j<arr[i].length;j++)
28+
{
29+
arr2[j][i] = arr[i][j];
30+
}
31+
}
32+
33+
//成功,遍历arr2数组就是转置数组
34+
for(var i=0;i<arr2.length;i++)
35+
{
36+
for(var j=0;j<arr2[i].length;j++)
37+
{
38+
document.writeln(arr2[i][j]+"&nbsp;");
39+
}
40+
document.write("<br/>");
41+
}
42+
</script>
43+
</body>
44+
</html>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>b.html</title>
5+
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
6+
<meta http-equiv="description" content="this is my page">
7+
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
8+
9+
<script language="javascript" type="text/javascript">
10+
function goback()
11+
{
12+
//back()方法可以加载历史前一个页面。
13+
//go()方法可以返回到访问过的指定的页面。他们都是history的方法。
14+
//history.back()=history.go(-1)
15+
history.back();
16+
}
17+
</script>
18+
</head>
19+
<body>
20+
<a href="#" onclick="goback();">返回上级页面</a>
21+
</body>
22+
</html>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>document4.html</title>
5+
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
6+
<meta http-equiv="description" content="this is my page">
7+
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
8+
<script language="javascript" type="text/javascript" for=document event=onselectstart>
9+
//innerText和innerHTML之间的区别
10+
function test()
11+
{
12+
document.getElementById("myspan").innerText="<a href='http://www.baidu.com'>innerText百度</a>";
13+
document.getElementById("myspan1").innerHTML="<a href='http://www.baidu.com'>innerHtml百度</a>";
14+
}
15+
//实现广告根据下拉框自动移动功能。
16+
function window_onscroll()
17+
{
18+
myHref.style.top=document.body.scrollTop+50;
19+
myHref.style.left=document.body.scrollLeft;
20+
}
21+
</script>
22+
//针对document来激发onselectstart事件。
23+
<script language="javascript" type="text/javascript" for=document event=onselectstart>
24+
// return document_onselectstart()
25+
return false; //让用户不能选择字面的内容
26+
</script>
27+
</head>
28+
<body onscroll="return window_onscroll()">
29+
<span id="myspan"></span>
30+
<span id="myspan1"></span>
31+
<input type="button" onclick="test()" value="测试">
32+
<a id="myHref" href="http://www.baidu.com" style="POSITION:absolute;" ><img src="ad.jpg"></a>
33+
</br></br></br></br></br></br></br></br></br></br></br></br>
34+
</br></br></br></br></br></br></br></br></br></br></br></br>
35+
</br></br></br>顶顶顶</br></br></br>
36+
</br></br></br></br></br></br>
37+
</br></br></br>出差</br></br></br>
38+
</br></br></br>xxx</br></br></br>
39+
</body>
40+
</html>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
body{
2+
border:1px solid red;/*宽度 样式 颜色*/
3+
width:800px;
4+
height:1000px;
5+
margin: 0 auto;/*上下内边框为0,左右内边框居中*/
6+
}
7+
.s1{
8+
width:150px;
9+
height:152px
10+
border:1px solid blue;
11+
margin-top:10px;
12+
margin-left:50px;
13+
border: dotted;
14+
border-top:1px solid red;
15+
}
16+
17+
.s1 img{
18+
width:40px;
19+
margin-left:5px;
20+
margin-top:5px;
21+
border: dashed;
22+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
<html>
4+
<head>
5+
<title>box1.html</title>
6+
7+
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
8+
<link rel="stylesheet" href="box1.css" type="text/css"></link>
9+
</head>
10+
11+
<body>
12+
<div class="s1"><img src="images/100.jpg"/></div>
13+
</body>
14+
</html>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<html>
2+
<head>
3+
<style type="text/css">
4+
.style1{
5+
font-size:20px;
6+
color:red;
7+
font-weight:bold;
8+
font-style:italic;
9+
text-decoration:underline;
10+
}
11+
</style>
12+
</head>
13+
<body class="style1">
14+
<span >栏目一</span></br>
15+
<span >栏目二</span></br>
16+
<span >栏目三</span></br>
17+
<span >栏目四</span></br>
18+
<span >栏目五</span></br>
19+
</body>
20+
</html>

0 commit comments

Comments
 (0)