window.open(页面2)在页面2内 onclick为页面1增加行和列PS:一个页面的话:
<html>
<head>
<script>
function Add()
{
var tbody1 = document.getElementById("tbody1");
var tr = document.createElement("<tr>");
var td = document.createElement("<td>");
var text = document.createTextNode("新增的行");
td.appendChild(text);
tr.appendChild(td);
tbody1.appendChild(tr);
}
</script>
</head>
<body>
<table id="table1" border=1>
<tbody id="tbody1">
</table>
<input type="button" onclick="Add()" value="Add">
</body>
</html>
<html>
<head>
<script>
function Add()
{
var tbody1 = document.getElementById("tbody1");
var tr = document.createElement("<tr>");
var td = document.createElement("<td>");
var text = document.createTextNode("新增的行");
td.appendChild(text);
tr.appendChild(td);
tbody1.appendChild(tr);
}
</script>
</head>
<body>
<table id="table1" border=1>
<tbody id="tbody1">
</table>
<input type="button" onclick="Add()" value="Add">
</body>
</html>
解决方案 »
- IE9 加载梅花雪树形控件(MzTreeView)2.0 时报Syntax error on load System.Global
- Tree和panel不得不说的事~~!!求救~~~
- 有一个带背景色的层在图片上时,图片onmousemove无效如何解决
- DOJO中 xhrPost 提交 dijit.form.Form
- 用ajax上传后文本框文字不会再变动了
- 简单的问题,谢谢大家指点!
- 分辨率改变之后下拉菜单(层)位置错乱怎么解决?
- 真是奇怪,为什么我用mac 系统 netscape浏览器,在《div》中的下拉列表,设overflow:auto,下啦列表就打不开?
- 如何控制当一框架页面刷新时另一嵌入框架也刷新?
- easyui的datagrid控件我通过行最后一列的编辑按钮编辑行却得不到这行的id去更新 求解决办法
- JavaScript高效去掉数组中的重复元素问题
- 关于合并单元格,只要doTab2()不是在最前面,比如(doTab1();doTab12();doTab0();),那么,doTab2()就不执行。为什么??
document.createElement("tr");
<html>
<head></head>
<body>
<input type="button" onclick="Add()" >
</body>
</html>