css
25.04.2011 / 02:53
.textarea, .textareaFull{
border:0;
max-width: 400px;
height: 24px;
background: #ecefff;
color: #556;
font-size: 11px;
padding: 1px 3px;
overflow: hidden;
}
.textarea:focus{
height:40px;
}
.textareaFull:focus{
height:100px;
}
js
function inputSixe(){
if(document.form.message.style.height=='100%'){
document.form.message.style.height='200%';
}else{
document.form.message.style.height='50%';
}
}
html
<a href="#form" onclick="javascript:inputSixe()"><img src="/image/editor/textarea.png" alt="размер формы ввода" /></a>
/* ------------------------ */
<textarea class="textarea" name="message" cols="80" rows="4" onkeydown="SendComment(event)" placeholder="Оставь свой комментарий"></textarea>