批量添加数据的问题

sy_binbin 2006-05-08 11:23:39
http://community.csdn.net/Expert/topic/4468/4468252.xml?temp=8.320254E-02

类似上面那样的代码我会写,现在我要求添加纪录的条数我自己来掌握.比如添加一条以后我按"再添加一条"的按钮,就会出现新的表单,然后还可以删除表单.这样的代码该怎么写呢??
...全文
141 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
jobs002 2006-05-08
  • 打赏
  • 举报
回复

<script language="javascript">
<!--
function addNewButton()
{
var newb=document.createElement("FORM");
newb.innerHTML="<input type='text'>";

document.body.appendChild(newb);
}

--></script>
<button onClick="addNewButton()" value="btn1">点击增加一个文本框</button>参考一下..........
jobs002 2006-05-08
  • 打赏
  • 举报
回复
<HTML>
<HEAD>
<SCRIPT>
function createRadioButton(){
// Create radio button object with value="First Choice" and then insert
// this element into the document hierarchy.
var newRadioButton = document.createElement("<INPUT TYPE='RADIO' NAME='RADIOTEST' VALUE='First Choice'>")
document.body.insertBefore(newRadioButton);
// Create radio button object with value="Second Choice" and then insert
// this element into the document hierarchy.
newRadioButton = document.createElement("<INPUT TYPE='RADIO' NAME='RADIOTEST' VALUE='Second Choice'>")
document.body.insertBefore(newRadioButton);
}
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE="BUTTON" ONCLICK="createRadioButton()" VALUE="Create two Radio Buttons"><BR>
<INPUT TYPE="BUTTON" ONCLICK="alert ( document.body.outerHTML )" VALUE="Click here to see HTML">
<BODY>
</HTML>参考一下
sy_binbin 2006-05-08
  • 打赏
  • 举报
回复
UP
sy_binbin 2006-05-08
  • 打赏
  • 举报
回复
高手们,帮帮小弟吧
sy_binbin 2006-05-08
  • 打赏
  • 举报
回复
liuxiaoyi666(MSMVP小猪妹马甲之八卦兔子)

JS代码我不是很明白的!!
  • 打赏
  • 举报
回复
js里appendchild....不过name的命名要弄好了....
sy_binbin 2006-05-08
  • 打赏
  • 举报
回复
怎么没人来啊??

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧