2009-07-24 122 views

回答

4

所有文字這兩個FF和IE瀏覽器對我的作品。

<input type="text" value="username" id="user" /> 

<script> 
    $("#user").click(function() 
    { 
     $("#user").focus(); 
     $("#user").select(); 
    }); 
</script> 
1
$('textarea').click(function() { this.focus(); this.select(); }); 

這應該爲所有的textarea的工作 - 切換選擇如果需要的話。

我可能會去class='autoselect'然後$('.autoselect')

1

退房JQuery的UI「亮點」效應在http://jqueryui.com/demos/effect/

$(function() { 
    $("textBoxId") 
     .click(function(){ 
      var options = {}; 
      $("#textBoxId").effect("Highlight",options,500,callback); 
     }); 
    });