Skip to content

Commit

Permalink
Merge pull request #365 from smallice/master
Browse files Browse the repository at this point in the history
#2 提交实验代码
  • Loading branch information
zengsn authored Nov 5, 2016
2 parents 26a5cac + ea59198 commit 58499aa
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
73 changes: 73 additions & 0 deletions labs/1414080902127/index.html
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="gbk">
<style type="text/css">
div{ width:40%;margin-left:30%;}
</style>
</head>
<body >
<div>
<form class="f1" action="http://www.baidu.com" method="get" >
<fieldset >
<!--以下是学生信息-->
<legend>新建学生信息</legend>
<table width=75% >
<tbody>

<tr><td class="left" align="right"><label for="e1">学号:</label></td>
<td class="right"><input type="text" id="e1" name="Number" ></td>
</tr>
<tr ><td class="left" align="right"><label for="t1">姓 名:</label></td>
<td class="right"><input type="text" id="t1" name="Name"></td>
</tr>
<tr><td class="left" 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" align="right"><label for="e2">邮 箱:</label></td>
<td class="right"><input type="email" id="e1" name="youxiang" ></td>
</tr>
<tr><td class="left" align="right"><label for="Password2">密 码:</label></td>
<td class="right"><input id="Password1" type="password" name="Password" /></td>
</tr>
<tr><td class="left" align="right"><b>专 业:</b></td>
<td><select id="selc" name="place">
<option value="ruanjian">软件工程</option>
<option value="jike">计算机科学与技术</option>
<option value="wangluo" >网络工程</option>
</select>
</td>
</tr>
<tr><td class="left" align="right"><label for="txtarea">简 介:</label></td>
<td><textarea id="txtarea"></textarea></td>
</tr>
<tr><td class="left" align="right"><b>技能:</b></td>
<td><input type="checkbox" id="cbox1" name="cjia" value="c1">C/C++
<input type="checkbox" id="cbox2" name="cjin" value="c2">C#
<input type="checkbox" id="cbox3"name="Java" value="c3">java
<input type="checkbox" id="cbox4"name="android" value="c3">安卓
</td>
</tr>
<td>
<button type="button" class="btn btn-default">确认</button></td>
</tbody>
</table>
</fieldset>
</form>
</div>
</body>
</html>
13 changes: 13 additions & 0 deletions labs/1414080902127/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$( "#target" ).submit(function( event ) {
alert( "Handler for .submit() called." );
event.preventDefault();
});
//ÏÂÁÐÊǼÈë³É¹¦
$.ajax({
url: "success.json
}).done(function(data) {
if ( console && console.log ) {
console.dir(data);
alert(data.msg);
}
});
4 changes: 4 additions & 0 deletions labs/1414080902127/success.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//保存成功的提示
{
"msg": "保存成功!"
}

0 comments on commit 58499aa

Please sign in to comment.