新微赢技术网

标题: [求助]表单验证 [打印本页]

作者: 陪你疯→想你    时间: 2010-1-14 02:56
标题: [求助]表单验证
在网页上有一个小键盘(代码附后)
一个文本域 和 两个 按钮 当用小键盘输入正确密码的时候 点关闭网页能关闭浏览器
否则要求重写 有劳帮小弟我弄一下
小键盘及网页代码如下:
<html><head>
<title></title>
<script>
function ad(str)
{
document.form1.p1.value = document.form1.p1.value + str;
}
</script>
<style type="text/css">
<!--
.unnamed1 {
font-size: 24px;
text-decoration: blink;
}
-->
</style>
</head>
<body>
<form method=post action="" name="form1">
<div align="center">
<p>密码:
<input name="p1" type="password" value="">
</p>
<p>
<input type="submit" name="Submit" value="关闭网页">
<input type="reset" name="Submit2" value="重写">
</p>
</div>
</form>
<div align="center">
</form>
<br>
<br>
<span class="unnamed1"><br>
</span></div>
<div align="center" class="unnamed1"><a href="javascript:ad('a')">a</a>&nbsp;<a href="javascript:ad('b')"> b</a>&nbsp; <a href="javascript:ad('c')">c</a>&nbsp;<a href="javascript:ad('d')"> d</a>&nbsp; <a href="javascript:ad('e')">e </a>&nbsp;<a href="javascript:ad('f')">f</a>&nbsp; <a href="javascript:ad('g')">g</a>&nbsp;<a href="javascript:ad('h')"> h</a>&nbsp; <a href="javascript:ad('i')">i</a>&nbsp; <a href="javascript:ad('j')">j</a>&nbsp; <a href="javascript:ad('k')">k</a>&nbsp; <a href="javascript:ad('l')">l</a>&nbsp;<a href="javascript:ad('m')"> m</a><br>
<a href="javascript:ad('n')">n</a>&nbsp; <a href="javascript:ad('o')">o</a>&nbsp;<a href="javascript:ad('p')"> p</a>&nbsp; <a href="javascript:ad('q')">q</a> &nbsp;<a href="javascript:ad('r')">r</a> &nbsp;<a href="javascript:ad('s')">s</a> &nbsp;<a href="javascript:ad('t')">t</a>&nbsp; <a href="javascript:ad('u')">u</a>&nbsp; <a href="javascript:ad('v')">v</a>&nbsp; <a href="javascript:ad('w')">w</a> &nbsp;<a href="javascript:ad('x')">x</a>&nbsp; <a href="javascript:ad('y')">y</a> &nbsp;<a href="javascript:ad('z')">z</a><br>
<br>
<a href="javascript:ad('1')">1</a>&nbsp;<a href="javascript:ad('2')">2</a>&nbsp;<a href="javascript:ad('3')">3</a>&nbsp;<a href="javascript:ad('4')">4</a>&nbsp;<a href="javascript:ad('5')">5</a>&nbsp;<a href="javascript:ad('6')">6</a>&nbsp;<a href="javascript:ad('7')">7</a>&nbsp;<a href="javascript:ad('8')">8</a>&nbsp;<a href="javascript:ad('9')">9</a>&nbsp;<a href="javascript:ad('0')">0</a> </div>
</body>
</html>




欢迎光临 新微赢技术网 (http://bbs.weiying.cn/) Powered by Discuz! X3.2