日期:2014-05-17  浏览次数:21059 次

求助一段脚本~
想实现这样一个功能。就是点击+号就增加一行,点-号就减少一行。谢谢了~


------解决方案--------------------
<script language= "javascript " type= "text/javascript ">
function ClowU(idName,btnValue)
{
var obj;
obj=document.getElementById(idName);
if (btnValue== "++ ")
obj.rows++;
if (btnValue== "-- ")
obj.rows--;
}
</script>
</head>

<body>
<textarea name= "weks " id= "mok " cols= "20 " rows= "3 "> </textarea> <input type= "button " onclick=ClowU( "mok ", "++ ") value= "++ " />
<input type= "button " onclick=ClowU( "mok ", "-- ") value= "-- " />