2013年8月28日 星期三

html select on entry

html-select-on-entry
Select all where focus


onfocus="selectTextboxContent(this);"



function selectTextboxContent(textbox)
{
    setTimeout(function() { textbox.select(); }, 10);
}
 
Method 2

<input type="text" onClick="this.select();" value="This text will be selected." />




沒有留言:

張貼留言