acc
wlcacc
全部博文(170)
FireWorkflow(0)
Oracle(9)
ExtJS(19)
面试题集锦(5)
其他(2)
JavaScript(22)
DIV+CSS(12)
网页制作(0)
网络技术(2)
ASP(1)
Tomcat(1)
OS(0)
DB(0)
Hibernate(5)
Java(0)
Spring(1)
Struts(2)
Fireworks(15)
Windows(7)
Java(30)
MySQL(11)
2014年(7)
2010年(2)
2009年(62)
2008年(25)
2007年(67)
2006年(7)
knife800
alunfirs
格伯纳
Bsolar
浪花小雨
chengccy
qingfeng
laishiwa
Iqcw1368
分类:
2007-10-20 09:01:55
1. 长度限制<script>function test() {if(document.a.b.value.length>5){alert("不能超过50个字符!");document.a.b.focus();return false;}}</script><form name=a onsubmit="return test()"><textarea name="b" cols="40" wrap="VIRTUAL" rows="6"></textarea><input type="submit" name="Submit" value="check"></form> 2. 屏蔽关键字(这里屏蔽***和****)<script language="javascript1.2">function test() {if((a.b.value.indexOf ("***") == 0)||(a.b.value.indexOf ("****") == 0)){alert(":)");a.b.focus();return false;}}</script><form name=a onsubmit="return test()"><input type=text name=b><input type="submit" name="Submit" value="check"></form>3. 两次输入密码是否相同<FORM METHOD=POST ACTION=""><input type="password" id="input1"><input type="password" id="input2"><input type="button" value="test" onclick="check()"></FORM><script>function check(){ with(document.all){if(input1.value!=input2.value){alert("false")input1.value = "";input2.value = "";}else document.forms[0].submit();}}</script>4.屏蔽右键<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false">加在body中</body>5.复制文本到剪帖板<input title="点击复制标题和地址到剪贴版,直接在POPO/MSN上粘贴即可." type=button value="点击复制本网址,发给POPO/QQ/MSN好友共享" name="B3" onclick="copyToClipBoard()"> <script language='javascript'>function copyToClipBoard(){var clipBoardContent=''; clipBoardContent+=document.title;clipBoardContent+=window.location;window.clipboardData.setData("Text",clipBoardContent);alert("你已复制链接及标题,请粘贴到POPO/MSN等发给好友!");}</script> 6.载入页面<title>载入页面</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style type="text/css"><!--.unnamed1 { background-color: #000000}--></style></head><body><table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%"><tr> <form name=loading> <td align=center> <p align="center"> </p> <p align="center"><font color="#00FF00" size="2"></font></p> <p> <input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:#00FF00; background-color:black; padding:0px; border-style:none;"> <br> <br> <input type=text name=percent size=46 style="font-family:Arial; color:#00FF00; text-align:center; border-width:medium; border-style:none;" class="unnamed1"> <br> <br> <font color="#00FF00" size="2" > <script>var bar = 0 var line = "||" var amount ="||" count() function count(){ bar= bar+2 amount =amount + line document.loading.chart.value=amount document.loading.percent.value=bar+"%" if (bar<99) {setTimeout("count()",100);} else {alert("载入完毕")window.location = "";} }</script> </font></p> </td></form></tr></table></body></html>
上一篇:独立访客+唯一IP+pv访问量的含义
下一篇:java.lang.IllegalStateException: getOutputStream()
登录 注册