文章出處
文章列表
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script>
window.onload=function(){
function $(id){
return document.getElementById(id);
}
$("btn").onclick=function(){
if($("txt").value==123456&&$("txt1").value==123456789){
alert("登陸成功");
}else{
alert("登陸失敗");
}
}
}
</script>
</head>
<body>
<input type="text" id="txt" value="請輸入賬號" />
<input type="password" id="txt1" value="請輸入密碼" />
<button id="btn">登陸</button>
</body>
</html>
文章列表
全站熱搜