1 <%@ page language="java" contentType="text/html; charset=utf-8" 2 pageEncoding="utf-8"%> 3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 4 <html> 5 6 <head> 7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 8 <title>用户界面</title> 9 <style type="text/css"> 10 table.tab{ 11 font-family: verdana,arial,sans-serif; 12 font-size:11px; 13 border-color: red; 14 border-color: #666666; 15 border-collapse: collapse; 16 } 17 table.tab tr{ 18 border:30px; 19 border-color: #666666; 20 padding: 8px; 21 border-style: solid; 22 } 23 table.tab td{ 24 border-color: #666666; 25 background-color: #ffffff; 26 } 27 #btn{ 28 background-color: #666666; 29 } 30 </style> 31 <script type="text/javascript"> 32 function clcktd(){ 33 var a=document.getElementsByName("newpassword"); 34 var b=document.getElementsByName("conpassword"); 35 if((au.password=null || a==null || b==null) && (au.password=null && a==null && b==null)) 36 alert("密码不能为空!"); 37 if(b!=a){ 38 document.getElementById("inputpsd"); 39 ctrl.focus(); 40 } 41 } 42 </script> 43 </head> 44 <body> 45 <form action="" method="post"> 46 <div align="center"> 47 <table class="tab"> 48 <tr> 49 <td colspan="2" align="center"><h2> 50 <%=session.getAttribute("uname") %> 51 </h2> 52 </td> 53 </tr> 54 <tr> 55 <td> 56 旧密码: 57 </td> 58 <td> 59 <input name="au.password" type="password" /> 60 </td> 61 </tr> 62 <tr> 63 <td> 64 新密码: 65 </td> 66 <td> 67 <input name="newpassword" type="password"/> 68 </td> 69 </tr> 70 <tr> 71 <td> 72 确认密码: 73 </td> 74 <td> 75 <input name="conpassword" type="password" id="inputpsd"/> 76 </td> 77 </tr> 78 <tr> 79 <td align="right" colspan="2" id="btn"> 80 <button type="submit" onclick="clcktd()">保存</button> 81 </td> 82 </tr> 83 </table> 84 </div> 85 </form> 86 </body> 87 </html>
按理说有alter呀,但是它根本就不会弹窗,是我的条件写错了?前端来帮忙撒
桃花长相依
婷婷同学_
子衿沉夜
蛊毒传说
白猪掌柜的
三国纷争
BIG阳
宝慕林4294392
慕雪6442864
jeck猫
相关分类