textarea id="le" style="width:250px;height:80px;"> </textarea>
<input type="button" value="Button 1" onclick="document.getElementById('le').style.height='140px';">
<input type="button" value="Button 2" onclick="document.getElementById('le').style.height='40px';">
<input type="button" value="Button 1" onclick="document.getElementById('le').style.height='140px';">
<input type="button" value="Button 2" onclick="document.getElementById('le').style.height='40px';">
解决方案 »
- js 如何判断复选框选择的value都相同
- 用JavaScript怎么编写删除留言的代码?
- Dom中的nextSibling属性
- IE中文本框选中问题
- 正則
- 如何用javascript读取在css文件里设定的style?
- 使用recordset提高数据库查询结果向前端推送数据的效率
- 这个者么写,有两个按钮A和B,当鼠标经过A的时候,<Div id="aa">a</div>,当鼠标经过B的时候,<Div id="aa">b</div>,也就是把div里的文字
- 刚接触javascript,几个小问题,大家帮帮忙
- 谁能帮我解释一段简单的程序?(急!!!!!!!!!!!!!!!)
- asp.net爱好者 56325139群等着你 让我们一起探讨和研究asp.net的精华
- 拖曳那点事(拖曳时到浏览器底部时自动向下流动)
<!--function change(a){
var text = document.getElementById("text");
if(a==1){
text.style.height = text.offsetHeight+ 20 +"px";
}
if(a==0){
text.style.height = text.offsetHeight - 20 +"px";
}
}</script><textarea id="text"></textarea>
<input type="button" value="增加" onclick="change(1)" />
<input type="button" value="减少" onclick="change(0)" />