2010-08-21 23 views

回答

2

看看this article

<input type="text" id="txtInput" /> 

然後:

$('#txtInput').click(function() { 
    var textbox = $(this); 
    textbox.focus(); 
    textbox.select(); 
}); 
2
$('input').focus(function() { 
    $(this).select(); 
});