没问题呀,试试下面代码先?
<script>
function addNew(){
a.document.all.t.insertRow().insertCell().innerText="hehe"
with(a.document.body)scrollTop=scrollHeight
}
</script>
<frameset cols="100,*">
<frame name=b src='about:<input type=button value=addNew onclick=top.addNew()>'>
<frame name=a src='about:<table id=t border><tr><td>test</table>'>
</frameset>
<script>
function addNew(){
a.document.all.t.insertRow().insertCell().innerText="hehe"
with(a.document.body)scrollTop=scrollHeight
}
</script>
<frameset cols="100,*">
<frame name=b src='about:<input type=button value=addNew onclick=top.addNew()>'>
<frame name=a src='about:<table id=t border><tr><td>test</table>'>
</frameset>
解决方案 »
- Jquery查找ul,li
- document.getElementById()可以取得页面听指定的元素?
- 请教贴!新手求助。。。
- 通过脚本内嵌帧如何获得父窗口的URL地址?是跨域的
- Easy Search and Replace V1.0
- 关于Opear问题。。。
- 急救!eLong网首页上的日历是怎么实现的?
- 请教大侠:模态对话框内的输入回车时,为傻会提交自己呢?(ie5~ie6)
- 一个报Stack overflow at line:11错误的程序,大家看看为什么会有这样的结果
- 如何识别图片上的数字
- 关于html中进行文本编辑的问题?(如何利用javascript来传递这些值?)
- 请问我有一组同名的复选框checkbox,我提交前,怎样去判断被选中了几个,分别得到他们的值做些处理。谢谢
<frame name=b src=b.htm>
<frame name=a src=a.htm>
</frameset>a.htm
...
<table>
<tbody id=mytbody>
</tbody>
</table>
...b.htm
...
<script>
function addrow(){
trn=parent.a.mytbody.insertRow();
trn.insertCell().innerHTML="...your html code..."
parent.a.document.body.scrollTop=parent.a.document.body.scrollHeight
}
</script>
...
<input type=buttton value="button" onclick="addrow()">