2011-11-16

露天拍賣密碼

修改密碼網頁

希望使用者輸入至多 15 個字元,可是 html 語法卻寫成:


<input name="userpass1" type="password" size="15" class="f1">
view raw gistfile1.html hosted with ❤ by GitHub


正確寫法是:

<input name="userpass1" type="password" size="15" maxlength="15" class="f1">
view raw gistfile1.html hosted with ❤ by GitHub


另外,登入頁面


<input type="password" onkeypress="return noenter(event)" style="width: 150px; height: 16px" title="密碼" value="" size="24" name="userpass">
view raw gistfile1.html hosted with ❤ by GitHub


修改密碼規定 15 個字元,這裡卻限制 24 個字元,明顯裡外不一。

沒有留言: