![](/bink.gif) |
|
| ![](/bink.gif) |
input textarea Æ÷Ä¿½º½Ã È¿°úÁÖ±â |
|
|
![](icon/private_name/1.gif) |
12³â Àü |
![](data/TG1/3696841043_XAK3uJBs_sprites(1).gif) ¿©·¯°¡Áö ¹æ¹ýÀÌ ÀÖ°ÚÁö¸¸ Àú´Â ¾Æ·¡ÀÇ ¹æ¹ýÀ» »ç¿ëÇÕ´Ï´Ù.
ÀÎDz¹Ú½ºÀÇ ½ºÅ¸ÀÏ Å¬·¡½º¸¦ º¸Åë¹Ú½º¿Í Æ÷Ä¿½º°¡ µé¾î°£¹Ú½º¸¦ ¹Ì¸® »ý¼ºÇصӴϴÙ.
jquery¸¦ ÀÌ¿ëÇÏ¿© ÀÎDz¹Ú½º¿¡ Ä¿¼°¡ ¸ÂÃçÁö¸é ¹Ì¸® »ý¼ºÇصР½ºÅ¸ÀÏ Å¬·¡½º·Î ¹Ù²î´Â ¿ø¸®ÀÔ´Ï´Ù.
HTML
<input type="text" class="inputbox" style="width:200px;" />
<textarea rows="10" cols="85" class="textbox" style="width:500px; height:200px;" ></textarea>
jQuery
$(function() {
// input Å׵θ®
$('input.inputbox').focus(function() {
$(this).addClass('focusbox');
}).blur(function() {
$(this).removeClass('focusbox');
});
// textarea Å׵θ®
$('textarea.textbox').focus(function() {
$(this).addClass('focustextbox');
}).blur(function() {
$(this).removeClass('focustextbox');
});
});
CSS
.inputbox,.focusbox {float:left; margin:0; height:auto; font-size:12px; color:#666;}.inputbox {padding:4px 1px 3px 5px; border-top:1px solid #b5b5b5; border-right:1px solid #ddd; border-bottom:1px solid #ddd; border-left:1px solid #b5b5b5;}.focusbox {padding:3px 0 2px 4px; border:2px solid #23adb2;}.textbox,.focustextbox {margin:0; width:539px; height:100px;}.textbox {padding:4px 1px 3px 5px; border-top:1px solid #b5b5b5; border-right:1px solid #ddd; border-bottom:1px solid #ddd; border-left:1px solid #b5b5b5;}.focustextbox {padding:3px 0 2px 4px; border:2px solid #23adb2;}
|
|
̵̧ : 749 |
̵̧
¸ñ·Ï
|
|
| ![](/bink.gif) |
|