怎样使一个INPUT框里的文字在框被点击后自动全选或清除?
$("#smsContent").focus(function(){ this.select(); });
<input name="keywords" type="text" value="关键字" onfocus="if(this.value == this.defaultValue) this.value = ''" onblur="if(this.value == '') this.value = this.defaultValue">