...
|
...
|
@@ -21,15 +21,29 @@ |
|
|
<form class="form">
|
|
|
<ul>
|
|
|
<li>
|
|
|
<input type="text" placeholder="請輸入您的用戶名">
|
|
|
<input type="text" name="name" placeholder="請輸入您的用戶名">
|
|
|
</li>
|
|
|
<li style="border:0">
|
|
|
<input type="password" placeholder="請輸入您的密碼">
|
|
|
<input type="password" name="pass" placeholder="請輸入您的密碼">
|
|
|
</li>
|
|
|
</ul>
|
|
|
<button type="button">登錄</button>
|
|
|
<button type="button" onclick="tlogin()">登錄</button>
|
|
|
</form>
|
|
|
</div>
|
|
|
</body>
|
|
|
|
|
|
<script>
|
|
|
function tlogin(){
|
|
|
name = $("input[name='name']").val();
|
|
|
pass = $("input[name='pass']").val();
|
|
|
if(name == ''){
|
|
|
alert('账号不能为空');
|
|
|
}else{
|
|
|
if(pass == ''){
|
|
|
alert('密码不能为空');
|
|
|
}else{
|
|
|
alert('成功');
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
</html> |
|
|
\ No newline at end of file |
...
|
...
|
|