📄 8-6-login.htm
字号:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=GB2312" />
<title>请登录</title>
<!-- 样式表 -->
<style>
* { font-size:12px; font-family:宋体, Arial; font-weight:normal; color:#333; } /*规定了所有的字体样式*/
body { overflow:auto; padding:5px; background-color:buttonface; }
input { border-width:1px; }
.button { padding:1px 4px; }
.small { font-size:3px; }
</style>
<script>
function doLogin(){
if($("txtName").value == "" || $("txtPass").value == ""){
alert("输入不完整!请重新输入!");
return;
}
window.returnValue = escape($("txtName").value) + ":" + escape($("txtPass").value);
window.close();
}
function cancelLogin(){
window.returnValue = undefined;
window.close();
}
window.onload = function(){
$("txtName").focus();
}
function $(str){ return(document.getElementById(str)); }
</script>
</head>
<body style="overflow:auto;">
<form onsubmit="doLogin();return(false);">
<table>
<tr>
<td>姓名:</td>
<td><input id="txtName"></td>
</tr>
<tr>
<td>密码:</td>
<td><input id="txtPass" type="password"></td>
</tr>
<tr>
<td colspan=2 align="center" class="small"> </td>
</tr>
<tr>
<td colspan=2 align="center">
<input type="submit" value="登录" class="button" onclick="doLogin(); return(false);" />
<input type="reset" value="取消" class="button" onclick="cancelLogin();" />
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -