$("#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">
原文:http://www.cnblogs.com/Akgu/p/5137895.html