java登录页面提示输入内容使用onvalidation

 1 <html>
 2   <head>      
 3   <title></title>
 4   </head>
 5   
 6   <body>
 7     <h3>用户登录</h3>
 8     <hr/>
 9     
10     <form action="Login.action" method="post">
11         <table>
12             <tr>
13               <td style="width:60px;"><label for="username$text">身份:</label></td>
14               <td>
15                   <select name="Type" id="Type" style="width:148px;"> 
16                     <option value="请选择">请选择</option>
17                     <option value="系统管理员">系统管理员</option>
18                     <option value="楼宇管理员">楼宇管理员</option>
19                     <option value="学生">学生</option>
20                   </select>
21               </td>
22             </tr>
23             <tr>
24                 <td>用户名</td>
25                 <td><input type="text" name="Username" onvalidation="onUserNameValidation" 
26                             class="mini-textbox"  
27                             required style="width:150px;"></td>
28             </tr>
29             <tr>
30                 <td>密码</td>
31                 <td><input type="password" name="Password" onvalidation="onUserNameValidation" 
32                             class="mini-textbox" 
33                             required style="width:150px;"></td>
34             </tr>
35             <tr>
36                 <td colspan="2">
37                     <input type="submit" value="登录">&nbsp;&nbsp;
38                     <input type="reset" value="重置">
39                 </td>
40             </tr>
41             <%if(request.getAttribute("Msg")!=null){%>
42             <%=request.getAttribute("Msg")%>
43             <%}%>
44         </table>
45     </form>
46   </body>
47 </html>

 

posted @ 2017-07-12 22:45  XuGuobao  阅读(503)  评论(0编辑  收藏  举报