在层中写入的对象应该如何调用?

lotuswit 2004-09-30 04:36:24
有<span id=cust style="position:relative;"></span>的层通过函数AddProp()往里写入如下内容:
display属性值为默认值,ID号如“Search_1,2,"格式的行,其中有按钮可触发delsearch()函数,功能为隐藏对应的<tr>。具体代码如下
data ="<tr style=display: id=search_"+document.form.prop.options[document.form.prop.selectedIndex].value+" ><td><input onClick=delsearch("+ document.form.prop.options[document.form.prop.selectedIndex].value+") type=button ><\/br><\/br><\/td><\/tr>";

函数delsearch(){document.all("search_"+theNO).style.display=none;
}
运行后显示错误,无对象。请问应该如何在函数delsearch()中应该如何调用<tr>?
...全文
81 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lotuswit 2004-10-06
  • 打赏
  • 举报
回复
up
lotuswit 2004-10-03
  • 打赏
  • 举报
回复
up
lotuswit 2004-09-30
  • 打赏
  • 举报
回复
楼上,在delsearch函数中改为document.getElementById("search_"+theNO).style.display=none还是通不过,提示错误是”缺少对象“。这段代码还是有问题。
guoweidong 2004-09-30
  • 打赏
  • 举报
回复
document.getElementById("search_"+document.form.prop.options[document.form.prop.selectedIndex].value);

87,997

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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