2010-12-11 16 views

答えて

25

を。

6
jQuery(function($){ 
    $('#foo').focus(function(){ 
    $(this).attr('rows',5); 
    }).blur(function(){ 
    $(this).attr('rows',1); 
    }); 
}); 

または、以下のjQuery、少ないタイピング、ヘアより高いパフォーマンスを得て使用して:MOOは、あなたのテキストエリアで

 $(document).ready(function(){ 

    $('#moo').focus(function(){ 
     $(this).attr('rows', '4'); 
    }); 
}); 

:あなたはこのような何かを試すことができ

jQuery(function($){ 
    $('#foo') 
    .focus(function(){ this.rows=5 }) 
    .blur(function(){ this.rows=1 }); 
}); 
0

この

$('#textboxid').focus(function() 
    { 
     $(this).animate({'height': '185px'}, 'slow');//Expand the textarea on clicking on it 
     return false; 
    }); 
+0

を試してみてください:あなたのソリューションの詳細については説明してください。参照:[回答方法​​](http://stackoverflow.com/questions/how-to-answer) – askmish

関連する問題