- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head>
- <title>test</title>
- <script language="javascript" type="text/javascript">
- function validateLength(obj)
- {
- return obj.value.length < obj.getAttribute("maxlength");
- }
- </script>
- </head>
- <body>
- <label for="userName">用戶名:</label>
- <input id="userName" type="text" maxlength="10" onmouseover="this.focus();" onfocus="this.select();" /><br /><br />
- <label for="passWord">密碼 :</label>
- <input id="passWord" type="password" onmouseover="this.focus();" onfocus="this.select();" /><br /><br />
- <label for="remark">備註 :</label>
- <textarea id="remark" onkeypress="return validateLength(this);" onmouseover="this.focus();" onfocus="this.select();" maxlength="50" cols="50" rows="5"></textarea>
- </body>
- </html>
表單的友好用戶體現
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.