-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from hzuapps/master
update 2
Showing
160 changed files
with
44,176 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<html> | ||
<head> | ||
<title> New Document </title> | ||
|
||
|
||
<!-- 新 Bootstrap 核心 CSS 文件 --> | ||
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css"> | ||
|
||
<!-- 可选的Bootstrap主题文件(一般不用引入) --> | ||
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap-theme.min.css"> | ||
|
||
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 --> | ||
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script> | ||
|
||
<!-- 最新的 Bootstrap 核心 JavaScript 文件 --> | ||
|
||
<script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> | ||
<script src="index.js" type="text/javascript"></script> | ||
<meta name="Generator" content="EditPlus"> | ||
<meta name="Author" content=""> | ||
<meta name="Keywords" content=""> | ||
<meta name="Description" content=""> | ||
<meta charset="utf-8"> | ||
<style type="text/css"> | ||
div{ width:35%;margin-left:32%;} | ||
</style> | ||
</head> | ||
<body > | ||
<div> | ||
<form class="f1" action="http://www.baidu.com" method="get" > | ||
<fieldset > | ||
<legend>表单的注册</legend> | ||
<table width=100% > | ||
<tbody> | ||
<tr ><td class=“left” width=40% align="right"><label for="t1">姓 名:</label></td> | ||
<td class="right"><input type="text" id="t1" name="Name"></td> | ||
</tr> | ||
<tr><td class=“left” width=40% align="right"><label for="Password1">密 码:</label></td> | ||
<td class="right"><input id="Password1" type="password" name="Password" /></td> | ||
</tr> | ||
<tr><td class=“left” width=40% align="right"><label for="e1">邮 箱:</label></td> | ||
<td class="right"><input type="email" id="e1" name="youxiang" ></td> | ||
</tr> | ||
<tr><td class=“left” width=40% align="right"><label for="1">性 别:</label></td> | ||
<td class="right"><input type="radio" id="1" name="ssex" value="nan" />男<!-- name设置成一样的就行了--> | ||
<input type="radio" id="2" name="ssex" value="nv" />女 | ||
</td> | ||
</tr> | ||
<tr><td class=“left” width=40% align="right">地 区:</td> | ||
<td><select id="selc" name="place"> | ||
<option value="quanzhou">泉州</option> | ||
<option value="xiamen">厦门</option> | ||
<option value="zhangzhou" >漳州</option> | ||
</select> | ||
</td> | ||
</tr> | ||
<tr><td class=“left” width=40% align="right"><label for="txtarea">简 介:</label></td> | ||
<td><textarea id="txtarea"></textarea></td> | ||
</tr> | ||
<tr><td class=“left” width=40% align="right">兴 趣:</td> | ||
<td><input type="checkbox" id="cbox1" name="dushu" value="c1">读书 | ||
<input type="checkbox" id="cbox2" name="yundong" value="c2">运动 | ||
<input type="checkbox" id="cbox3"name="chihe" value="c3">吃喝 | ||
</td> | ||
</tr> | ||
<button type="button" class="btn btn-default">确认</button> | ||
</tbody> | ||
</table> | ||
</fieldset> | ||
</form> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$(function(){ | ||
$( ".btn" ).click(function( event ) { | ||
alert( "确定" ); | ||
$.ajax({ | ||
url: "ok.json" | ||
}).done(function(data) { | ||
if ( console && console.log ) { | ||
console.dir(data); | ||
alert(data.msg); | ||
} | ||
}); | ||
event.preventDefault(); | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"msg": "����ɹ���" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<!-- 此页面目标是高仿百度的个人资料修改页面,但是仿不成。。。 --> | ||
<html lang="zh-cn"> | ||
<head> | ||
<meta content="text/html;charset=utf-8" /> | ||
<title>实验一——个人基本资料修改页面</title> | ||
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css"> | ||
<script type="text/javascript" src="index.js"></script> | ||
<script type="text/javascript" src="http://cdn.bootcss.com/jquery/3.1.1/jquery.js"></script> | ||
<script type="text/javascript" > | ||
$(document).ready(function(){ | ||
$("#form1").submit(function(){ | ||
$.getJSON("success.json",function(data){ | ||
console.log(data); | ||
alert(data.msg); | ||
}); | ||
}); | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
<form id="form1" method="post" action=""> | ||
<table align="center"> | ||
<tr><td colspan="2"><h4 class="page-header">基本资料</h4></td></tr> | ||
<tr> | ||
<td align="right">性别:</td> | ||
<td> | ||
<input name="sex" type="radio" value="0" checked>男 | ||
<input name="sex" type="radio" value="1">女 | ||
</td> | ||
</tr> | ||
<tr><td><br/></td></tr> | ||
<tr> | ||
<td align="right">生日:</td> | ||
<td> | ||
<select id="year" name="year" onChange="onYearChange();"> | ||
<option selected>年</option> | ||
</select> | ||
<select id="month" name="month" onChange="onMonthChange();"> | ||
<option selected>月</option> | ||
</select> | ||
<select id="day" name="day" style="display:none"> | ||
<option selected>日</option> | ||
</select> | ||
</td> | ||
</tr> | ||
<tr><td><br/></td></tr> | ||
<tr> | ||
<td align="right">血型:</td> | ||
<td> | ||
<select name="blood" class="form-control"> | ||
<option value="0" selected>未知</option> | ||
<option value="1">A</option> | ||
<option value="2">B</option> | ||
<option value="3">O</option> | ||
<option value="4">AB</option> | ||
<option value="5">其他</option> | ||
</select> | ||
</td> | ||
</tr> | ||
<tr><td><br/></td></tr> | ||
<tr> | ||
<td align="right">出生地:</td> | ||
<td><input name="hometown" type="text" class="form-control"></td> | ||
</tr> | ||
<tr><td><br/></td></tr> | ||
<tr> | ||
<td align="right">居住地:</td> | ||
<td><input name="house" type="text" class="form-control"></td> | ||
</tr> | ||
<tr><td><br/></td></tr> | ||
<tr> | ||
<td valign="top" align="right" style="line-height:36px">个人简介:</td> | ||
<td><textarea name="pesonal" cols="50" rows="8" class="form-control"></textarea></td> | ||
</tr> | ||
<tr><td><br/></td></tr> | ||
<tr> | ||
<td></td> | ||
<td> | ||
<input id="save" type="submit" class="btn btn-sm btn-primary" value="保存"> | ||
</td> | ||
</tr> | ||
</table> | ||
</form> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
window.onload = function(){ | ||
//初始化年份列表 | ||
var years = document.getElementById("year"); | ||
var year = new Date().getFullYear(); | ||
var node = null; | ||
while(year >= 1900){ | ||
node = new Option(year,year); | ||
years.options.add(node); | ||
year--; | ||
} | ||
//初始化月份列表 | ||
var months = document.getElementById("month"); | ||
for(var i = 1;i <= 12;i++){ | ||
node = new Option(i,i); | ||
months.options.add(node); | ||
} | ||
}; | ||
//判断当前选择的年份是否是闰年 | ||
function isLeap(){ | ||
var options = document.getElementById("year").options; | ||
var index = options.selectedIndex; | ||
var year = options[index].text; | ||
if(year % 100 != 0){ | ||
if(year % 4 == 0) | ||
return true; | ||
}else{ | ||
if(year % 400 == 0) | ||
return true; | ||
} | ||
return false; | ||
} | ||
//清空options集合但保留第一项 | ||
function clear(options){ | ||
var len = options.length - 1; | ||
for(var i = 0;i < len;i++) | ||
options.remove(1); | ||
} | ||
//年份变化时执行 | ||
function onYearChange(){ | ||
onMonthChange(); | ||
} | ||
//月份变化时执行 | ||
function onMonthChange(){ | ||
//获取当前选择的年份项索引 | ||
var yearIndex = document.getElementById("year").options.selectedIndex; | ||
//获取当前选择的月份 | ||
var month = document.getElementById("month").options.selectedIndex; | ||
//获取日列表对象 | ||
var days = document.getElementById("day"); | ||
//获取当前选择的日项索引 | ||
var oldDayIndex = days.selectedIndex; | ||
//如果年份或月份没有选择,就隐藏日列表并结束 | ||
if(month == 0 || yearIndex == 0){ | ||
days.style.display = "none"; | ||
return; | ||
} | ||
//显示日列表 | ||
days.style.display = ""; | ||
//计算最大的日数 | ||
var maxDay = null; | ||
switch(month){ | ||
case 1: | ||
case 3: | ||
case 5: | ||
case 7: | ||
case 8: | ||
case 10: | ||
case 12: | ||
maxDay = 31; | ||
break; | ||
case 2: | ||
if(isLeap() == true) | ||
maxDay = 29; | ||
else | ||
maxDay = 28; | ||
break; | ||
default: | ||
maxDay = 30; | ||
} | ||
//情况原日列表,保留第一项 | ||
clear(days.options); | ||
//重新插入日项 | ||
var node = null; | ||
for(var i = 1;i <= maxDay;i++){ | ||
node = new Option(i,i); | ||
days.options.add(node); | ||
} | ||
//如果原来选择的日不超过新的最大日数,则保留原选择 | ||
if(oldDayIndex <= maxDay) | ||
days.options.selectedIndex = oldDayIndex; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"msg" : "保存成功!" | ||
} |
Oops, something went wrong.