Skip to content

Commit

Permalink
hzuapps#2 提交实验源代码
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzejay committed Oct 17, 2016
1 parent 831ac93 commit f396476
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 0 deletions.
110 changes: 110 additions & 0 deletions labs/1414080902206/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<!-- 网页随屏幕的大小变化而变化 -->

<meta name="viewport" content="width=device-width,initial-scale=1.0">

<!-- 支持IE浏览器 -->

<meta http-equiv="X-UA-Compatible" content="IE-edge">

<title>外卖管理系统</title>

<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">

<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>

<script type="text/javascript" src="index.js">
</script>


<body >

<div style="background-color:silver;height:150px">

<div class="container">

<div class="row" style="margin-top: 180px">

<div class="col-md-5 col-md-offset-3" style="background-color: LightSteelBlue">

<h1>欢迎登录水果兄弟外卖</h1>

<form class="form-horizontal" style="margin-top: 20px" method="get">

<div class="form-group">

<label for="inputEmail3" class="col-sm-2 control-label">账号:</label>

<div class="col-sm-10">

<input type="email" class="form-control" id="inputEmail3" placeholder="账号">

</div>

</div>

<div class="form-group">

<label for="inputPassword3" class="col-sm-2 control-label">密码:</label>

<div class="col-sm-10">

<input type="password" class="form-control" id="inputPassword3" placeholder="密码">

</div>

</div>

<div class="form-group">

<div class="col-sm-offset-2 col-sm-10">

<div class="checkbox">

<label>

<input type="checkbox"> 记住号码
</label>

</div>

</div>

</div>

<div class="form-group">

<div class="col-sm-offset-2 col-sm-10">

<!-- submit 提交form表单中的数据到action指定的页面
<button type="submit" class="btn btn-default">登录</button> -->

<input type="button" class="btn btn-default" value="登录"/>

</div>

</div>


</form>

</div>

</div>

</div>

</div>


</body>

</html>
15 changes: 15 additions & 0 deletions labs/1414080902206/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$(function(){
var id;
var password;
$("input[type=button]").click(function(){
id=$("#inputEmail3").val();
password=$("#inputPassword3").val();
if(id==""||password==""){
alert("Please input your username and password!");
}else{
$.getJSON("success.json",function(date){
alert(date.msg);
})
}
});
})
3 changes: 3 additions & 0 deletions labs/1414080902206/success.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"msg": "login is successful!"
}

0 comments on commit f396476

Please sign in to comment.