Last active
August 29, 2015 13:56
-
-
Save zhoumengkang/9266777 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="text" class='user' value='用户名 仅英文或数字' onfocus="if(this.value=='用户名 仅英文或数字'){this.value=''}" onblur="if(!$.trim(this.value)){this.value='用户名 仅英文或数字'}"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
直接用jquery的$.trim