<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>登录</title>
<script src="js/jquery-1.8.3.min.js"></script>
<script>
window.onload=function(){
$("#butt").click(function(){
var account=$(".login_account").val();
var password=$(".login_password").val();
if(account==""||account==null){
alert("请输入账号!");
return ;
}
if(password==""||account==null){
alert("请输入密码!");
return ;
}
//alert(account);
$.ajax({
type:"POST",
url: "http://192.168.3.106:8088/portal/login.htm",
dataType: "json",
data:{account:account,password:password},
success: function () {
alert("!!");
}
})
});
}
</script>
</head>
<body>
<div class="content">
Account:<input type="text" placeholder="请输入手机号" class="login_account"></input>
Password:<input type="password" placeholder="请输入密码" class="login_password"></input>
<input id="butt" type="button" value="登录">
</div>
</body>
</html>
"# id" "#"号后跟id.
".class" "."号后跟class.