标签:username down img document ffffff contains rip dex keycode
嗯,做出来了好大一部分。。。。。
1 <%@ page language="java" contentType="text/html; charset=utf-8" 2 pageEncoding="utf-8"%> 3 <!DOCTYPE html> 4 <html> 5 <head> 6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7 <title>用户填写</title> 8 <script type="text/javascript"> 9 10 </script> 11 </head> 12 <body> 13 <form action="AddTableSer" method="post" onsubmit="check()"> 14 <img src="login/main_02.jpg"> 15 <table align="center" cellspacing="0" border="1"> 16 <tr> 17 <td align="right" width="100">技术需求名称</td> 18 <td><input type="text" name="name" id="name" 19 style="width: 500px; height: 50px"></td> 20 </tr> 21 <tr> 22 <td>重大科技需求概述</td> 23 <th colspan=""><textarea name="content" rows="6" cols="60" 24 onpropertychange="if(this.scrollHeight>60) this.style.posHeight=this.scrollHeight+5">主要内容,技术指标、预期经济和社会效益等,限500字</textarea> 25 </th> 26 </tr> 27 28 <tr> 29 <td align="center" >研究类型</td> 30 <td align="left" width="400"><input type="checkbox" 31 name="colors" id="one">基础研究 <input type="checkbox" 32 name="colors" id="two">应用研究 <input type="checkbox" 33 name="colors" id="three">实验发展 <input type="checkbox" 34 name="colors" id="four">研究发展与成果应用 <input type="checkbox" 35 name="colors" id="five">技术推广与科技服务</td> 36 </tr> 37 <tr> 38 <td align="center" width="35">技术需求合作模式</td> 39 <td align="left" width="400"><input type="radio" name="colors" 40 id="one">基础研究 <input type="radio" name="colors" id="two">应用研究 41 <input type="radio" name="colors" id="three">实验发展 <input 42 type="radio" name="colors" id="four">研究发展与成果应用 <input 43 type="radio" name="colors" id="five">技术推广与科技服务</td> 44 </tr> 45 <tr> 46 <td align="right">计划总投资</td> 47 <td><input type="text" name="phonenum" id="phonenum" 48 style="width: 500px; height: 30px" maxsize="500"></td> 49 </tr> 50 </table> 51 <table align="center"> 52 <tr> 53 <td ><input type="submit" value="添 加" ></td> 54 55 </tr> 56 57 </table> 58 59 </form> 60 </body> 61 </html>
1 <html> 2 <head> 3 <title>登陆</title> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 <style type="text/css"> 6 <!-- 7 body { 8 margin-left: 0px; 9 margin-top: 0px; 10 margin-right: 0px; 11 margin-bottom: 0px; 12 background-image: url(login/loginbg.jpg); 13 background-repeat: repeat-x; 14 } 15 --> 16 </style> 17 <script type="text/javascript" src="js/jquery-1.4.js"></script> 18 <script type="text/javascript" src="login/refresh.js"></script> 19 <!-- 回车换行 --> 20 <script language="javascript" for="document" event="onkeydown"> 21 if (event.keyCode == 13 && event.srcElement.type != ‘button‘ 22 && event.srcElement.type != ‘submit‘ 23 && event.srcElement.type != ‘reset‘ 24 && event.srcElement.type != ‘textarea‘ 25 && event.srcElement.type != ‘‘) 26 27 event.keyCode = 9; //Tab的键值为9 Enter的键值为13 28 </script> 29 30 <script type="text/javascript"> 31 function MM_swapImgRestore() { //v3.0 32 var i, x, a = document.MM_sr; 33 for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) 34 x.src = x.oSrc; 35 } 36 function MM_preloadImages() { //v3.0 37 38 var d = document; 39 if (d.images) { 40 if (!d.MM_p) 41 d.MM_p = new Array(); 42 var i, j = d.MM_p.length, a = MM_preloadImages.arguments; 43 for (i = 0; i < a.length; i++) 44 if (a[i].indexOf("#") != 0) { 45 d.MM_p[j] = new Image; 46 d.MM_p[j++].src = a[i]; 47 } 48 } 49 } 50 51 function MM_findObj(n, d) { //v4.01 52 var p, i, x; 53 if (!d) 54 d = document; 55 if ((p = n.indexOf("?")) > 0 && parent.frames.length) { 56 d = parent.frames[n.substring(p + 1)].document; 57 n = n.substring(0, p); 58 } 59 if (!(x = d[n]) && d.all) 60 x = d.all[n]; 61 for (i = 0; !x && i < d.forms.length; i++) 62 x = d.forms[i][n]; 63 for (i = 0; !x && d.layers && i < d.layers.length; i++) 64 x = MM_findObj(n, d.layers[i].document); 65 if (!x && d.getElementById) 66 x = d.getElementById(n); 67 return x; 68 } 69 70 function MM_swapImage() { //v3.0 71 var i, j = 0, x, a = MM_swapImage.arguments; 72 document.MM_sr = new Array; 73 for (i = 0; i < (a.length - 2); i += 3) 74 if ((x = MM_findObj(a[i])) != null) { 75 document.MM_sr[j++] = x; 76 if (!x.oSrc) 77 x.oSrc = x.src; 78 x.src = a[i + 2]; 79 } 80 } 81 function realodpage() { 82 //alert(document.getElementById("shuaxin").src); 83 $("#shuaxin").attr("src", "login/randCode.jsp?" + Math.random()); 84 } 85 function re() { 86 setTimeout("realodpage()", 10); 87 } 88 re(); 89 </script> 90 </head> 91 <body bgcolor="#FFFFFF" 92 onLoad="MM_preloadImages(‘login/login000_06.jpg‘,‘login/loging000_07.jpg‘)"> 93 94 <table width="795" height="475" border="0" align="center" 95 cellpadding="0" cellspacing="0" id="__01"> 96 <tr> 97 <td colspan="5"><img src="login/login_01.jpg" width="795" 98 height="159" ></td> 99 </tr> 100 <tr> 101 <td rowspan="2"><img src="login/login_02.jpg" width="269" 102 height="174" ></td> 103 <td bgcolor="#CFE5F2"><img src="login/login_03.jpg" width="66" 104 height="115" ></td> 105 <td colspan="2" bgcolor="#D0E6F3"><table width="100%" 106 height="116" border="0" cellpadding="0" cellspacing="0"> 107 <tr> 108 <td colspan="2" align="left" valign="bottom"><INPUT 109 NAME="LoginName" TYPE="text" CLASS="STYLE1" 110 STYLE="width: 180px; height: 17px; border: #336699 1px solid" 111 tabindex="1" MAXLENGTH="26" id="username"></td> 112 </tr> 113 <!-- 用户名 --> 114 <tr> 115 <td height="32" colspan="2" align="left" valign="bottom"><INPUT 116 NAME="LoginName" TYPE="password" CLASS="STYLE1" 117 STYLE="width: 180px; height: 17px; border: #336699 1px solid" 118 tabindex="1" MAXLENGTH="26" id="userpassword"></td> 119 </tr> 120 <!-- 密码 --> 121 <tr> 122 <td width="50%" height="29" align="left" valign="bottom"><INPUT 123 NAME="LoginName" TYPE="text" CLASS="STYLE1" 124 STYLE="width: 100px; height: 17px; border: #336699 1px solid" 125 tabindex="1" MAXLENGTH="26" id="randcode"></td> 126 <td width="50%" align="left" valign="bottom"><img 127 src="login/randCode.jsp" id=‘shuaxin‘ width="50" height="25"> 128 </td> 129 </tr> 130 <!-- 验证码 --> 131 <tr> 132 <td height="30" colspan="1" align="left" valign="bottom"> </td> 133 </tr> 134 </table></td> 135 <td rowspan="2"><img src="login/login_05.jpg" width="262" 136 height="174" ></td> 137 </tr> 138 <tr> 139 <td colspan="2"><a href="" onMouseOut="MM_swapImgRestore()" 140 onMouseOver="MM_swapImage(‘Image12‘,‘‘,‘login/loging000_06.jpg‘,1)"><img 141 src="login/login_06.jpg" name="Image12" width="135" height="59" 142 border="0" onClick="IMG1_onclick2()"></a></td> 143 <!-- 登陆 --> 144 145 <td><a href="#" onMouseOut="MM_swapImgRestore()" 146 onMouseOver="MM_swapImage(‘Image13‘,‘‘,‘login/loging000_08.png‘,1)"><img 147 src="login/login_09.png" name="Image13" width="129" height="59" 148 border="0" onClick="window.location=‘register.jsp‘"></a></td> 149 <!-- 注册 --> 150 </tr> 151 <tr> 152 <td colspan="5"><img src="login/login_08.jpg" width="795" 153 height="141" border="0" usemap="#Map"></td> 154 </tr> 155 <tr> 156 <td><img src="login/分隔符.gif" width="269" 157 height="1" ></td> 158 <td><img src="login/分隔符.gif" width="66" 159 height="1" ></td> 160 <td><img src="login/分隔符.gif" width="69" 161 height="1" ></td> 162 <td><img src="login/分隔符.gif" width="129" 163 height="1" ></td> 164 <td><img src="login/分隔符.gif" width="262" 165 height="1" ></td> 166 </tr> 167 <tr> 168 <td colspan="5" align="center"><a href="download/Browser.zip">浏览器兼容问题说明</a> 169 </td> 170 </tr> 171 </table> 172 <!-- End Save for Web Slices --> 173 174 <map name="Map"> 175 <area shape="rect" coords="484,16,558,34" href="#" onclick="test()" 176 target="_self"> 177 </map> 178 </body> 179 <script type="text/javascript"> 180 function IMG1_onclick2() { 181 var user = document.getElementById("username"); 182 var pwd = document.getElementById("userpassword"); 183 var randcode = document.getElementById("randcode"); 184 var url = "dengluServlet?user=" + escape(user.value) + "&pwd=" 185 + escape(pwd.value) + "&randcode=" + escape(randcode.value); 186 if (user.value == "") { 187 alert("用户名不能为空"); 188 189 } else if (pwd.value == "") { 190 alert("密码不能为空"); 191 192 } else if (randcode.value == "") { 193 alert("验证码不能为空"); 194 195 } else if (user.value.length > 20 || user.value.length < 6) { 196 alert("用户名小于6位或大于20位"); 197 198 } else if (pwd.value.length > 20 || pwd.value.length < 6) { 199 alert("密码小于6位或大于20位"); 200 201 } else if (!isNum(randcode.value)) { 202 alert("验证码只能由数字组成!"); 203 randcode.value = ""; 204 } else if (CheckCode(user.value) && CheckCode(pwd.value) 205 && CheckCode(randcode.value)) { 206 alert("有特殊字符请重新填写!"); 207 user.value = ""; 208 pwd.value = ""; 209 randcode.value = ""; 210 } else { 211 window.location.href = url; 212 alert(url); 213 } 214 } 215 function CheckCode(s) //有特殊字符为true 216 { 217 var containSpecial = RegExp(/[(\ )(\~)(\!)(\#)(\$)(\%)(\^)(\&)(\*)(\()(\))(\-)(\_)(\+)(\=)(\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\‘)(\")(\,)(\.)(\/)(\<)(\>)(\?)(\)]+/); 218 return (containSpecial.test(s)); 219 } 220 function isNum(str) { 221 for (ilen = 0; ilen < str.length; ilen++) { 222 if (str.charAt(ilen) < ‘0‘ || str.charAt(ilen) > ‘9‘) { 223 return false; 224 } 225 } 226 return true; 227 } 228 </script> 229 </html>
1 <%@ page language="java" contentType="text/html; charset=utf-8" 2 pageEncoding="utf-8"%> 3 <!DOCTYPE html> 4 <html> 5 <head> 6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7 <title>增加用户</title> 8 <script type="text/javascript"> 9 function check() { 10 11 var user = document.getElementById("name"); 12 var passone = document.getElementById("pass"); 13 var passtwo = document.getElementById("repass"); 14 var num = document.getElementById("phonenum"); 15 var unit = document.getElementById("unit"); 16 var n=num.value.length(); 17 alert(n); 18 if(user.value==""){ 19 alert("用户名不能为空"); 20 }else if(passone.value==""){ 21 alert("密码不能为空"); 22 }else if(passtwo.value==""){ 23 alert("确认密码不能为空"); 24 }else if(num.value==""){ 25 alert("手机号码不能为空"); 26 }else if(unit.value==""){ 27 alert("所属单位不能为空"); 28 }else if(passone.value!=passtwo.value){ 29 alert("密码不一致,请重新输入!"); 30 }else if(num.value.length!=11){ 31 alert("电话号码不正确"); 32 33 } 34 } 35 </script> 36 </head> 37 <body > 38 <img src="login/main_01.jpg"> 39 <a href="login.html">返回主页</a> 40 <form action="AddUserSer" method="post" onsubmit="check()"> 41 <table align="center" width="450"> 42 43 <tr> 44 <td align="center" colspan="2"> 45 <h2>注册用户信息</h2> 46 <hr> 47 </td> 48 </tr> 49 50 <tr> 51 <td align="right">姓名:</td> 52 <td><input type="text" name="name" id="name"></td> 53 </tr> 54 <tr> 55 <td align="right">密码:</td> 56 <td><input type="text" name="pass" id="pass"></td> 57 </tr> 58 <tr> 59 <td align="right">确认密码:</td> 60 <td><input type="text" name="repass" id="repass"></td> 61 </tr> 62 <tr> 63 <td align="right">手机号码:</td> 64 <td><input type="text" name="phonenum" id="phonenum"></td> 65 </tr> 66 <tr> 67 <td align="right">所属单位:</td> 68 <td><input type="text" name="unit" id="unit"></td> 69 </tr> 70 <tr> 71 <td align="center" colspan="2"> 72 <input type="submit" value="添 加"> 73 </td> 74 </tr> 75 </table> 76 </form> 77 </body> 78 </html>
1 <%@ page language="java" contentType="text/html; charset=utf-8" 2 pageEncoding="utf-8"%> 3 <!DOCTYPE html> 4 <html> 5 <head> 6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7 <title>增加用户</title> 8 <script type="text/javascript"> 9 function check() { 10 11 var user = document.getElementById("name"); 12 var passone = document.getElementById("pass"); 13 var passtwo = document.getElementById("repass"); 14 var num = document.getElementById("phonenum"); 15 var unit = document.getElementById("unit"); 16 var n=num.value.length(); 17 alert(n); 18 if(user.value==""){ 19 alert("用户名不能为空"); 20 }else if(passone.value==""){ 21 alert("密码不能为空"); 22 }else if(passtwo.value==""){ 23 alert("确认密码不能为空"); 24 }else if(num.value==""){ 25 alert("手机号码不能为空"); 26 }else if(unit.value==""){ 27 alert("所属单位不能为空"); 28 }else if(passone.value!=passtwo.value){ 29 alert("密码不一致,请重新输入!"); 30 }else if(num.value.length!=11){ 31 alert("电话号码不正确"); 32 33 } 34 } 35 </script> 36 </head> 37 38 <body bgcolor="#00ffff" > 39 40 41 42 <a href="login.html">返回主页</a> 43 <form action="AddUserSer" method="post" onsubmit="check()"> 44 <table align="center" width="450"> 45 46 <tr> 47 <td align="center" colspan="2"> 48 <h2>注册用户信息</h2> 49 <hr> 50 </td> 51 </tr> 52 53 <tr> 54 <td align="right">姓名:</td> 55 <td><input type="text" name="name" id="name"></td> 56 </tr> 57 <tr> 58 <td align="right">密码:</td> 59 <td><input type="text" name="pass" id="pass"></td> 60 </tr> 61 <tr> 62 <td align="right">确认密码:</td> 63 <td><input type="text" name="repass" id="repass"></td> 64 </tr> 65 <tr> 66 <td align="right">手机号码:</td> 67 <td><input type="text" name="phonenum" id="phonenum"></td> 68 </tr> 69 <tr> 70 <td align="right">所属单位:</td> 71 <td><input type="text" name="unit" id="unit"></td> 72 </tr> 73 <tr> 74 <td align="center" colspan="2" > 75 <input type="submit" value="添 加" > 76 </td> 77 </tr> 78 </table> 79 </form> 80 </body> 81 </html>
标签:username down img document ffffff contains rip dex keycode
原文地址:https://www.cnblogs.com/msdog/p/10466761.html