如何动态增加文本框? function add(){document.writeln("<input type='text' name='textfield'>");}上面的name属性可以用参数的。取消一个好像比较困难,还没想到办法。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <form><input type="button" onclick="addline()" value="增加"><table border="1" id="test"> <tr> <td colspan="2"><input type="text" name="tt[]"></td> </tr></table><input type="submit"></form><script>function addline(content){ newline=document.all.test.insertRow(); newline.insertCell().innerHTML='<input type="text" name="tt[]"><input type="button" value="删除此行" onclick="del()">'}function del(){ document.all.test.deleteRow(window.event.srcElement.parentElement.parentElement.rowIndex);}</script> 关于jquery easyui treegrid的一个问题 求一个javascript控制div左右移动效果!!源码 关于Vista中的window.open 请推荐一个javascript 框架 js 如何实现时间相减得到所需的小时差 学习ajax验证表单时候中文乱码的问题 javascript做的一个日历插件,有兴趣的可以看看。 怎样实现点击一个链接,传出的页面没有标题栏,工具栏.. JS问题,~回调函数 当在js动态设置select的值大量使用options.add的问题 关于刷新声音控制问题 请问如何实现在图像的指定区域上移动鼠标时显示提示信息,在线等!!!
<input type="button" onclick="addline()" value="增加">
<table border="1" id="test">
<tr>
<td colspan="2"><input type="text" name="tt[]"></td>
</tr>
</table>
<input type="submit">
</form>
<script>
function addline(content){
newline=document.all.test.insertRow();
newline.insertCell().innerHTML='<input type="text" name="tt[]"><input type="button" value="删除此行" onclick="del()">'}
function del(){
document.all.test.deleteRow(window.event.srcElement.parentElement.parentElement.rowIndex);
}
</script>