在輸入登錄框的時候,經常會用到一個特效,若原來的輸入框有值,那麼點擊的時候原來輸入框中的值會消失,提高用戶體驗度。
這是代碼段:
<input type="text" name="username" οnfοcus="this.value='';" οnblur="if(this.value=='')this.value='用戶名' ">
在輸入登錄框的時候,經常會用到一個特效,若原來的輸入框有值,那麼點擊的時候原來輸入框中的值會消失,提高用戶體驗度。
這是代碼段:
<input type="text" name="username" οnfοcus="this.value='';" οnblur="if(this.value=='')this.value='用戶名' ">