8-6 登录效果.htm
来自「JAVASCRIPT完全自学手册,中源码的验证修订实例」· HTM 代码 · 共 32 行
HTM
32 行
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=GB2312" />
<title>8-6 登录效果</title>
<!-- 样式表 -->
<style>
* { font-size:12px; font-family:宋体, Arial; font-weight:normal; color:#333; } /*规定了所有的字体样式*/
</style>
<script>
var userName, userPass;
function checkLogin(){
var str = showModalDialog("8-6-login.htm","","dialogHeight=120px; dialogWidth=200px; status=no; help=no");
if(!str){
document.write("你已取消了登录");
return;
}
userName = unescape(str.split(":")[0]);
userPass = unescape(str.split(":")[0]);
document.write("欢迎你" + userName);
}
</script>
</head>
<body style="overflow:auto;">
<div style="font-size:14px; font-weight:bold; color:white; font-family:Arial, 宋体; background-color:#6090DA; padding:4px 10px;">
<script>
checkLogin();
</script>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?