js动态加载控件jsp页面
2020-12-13 03:53
标签:blog class c java tar ext 例子1:(具体参照drp中的flow_card_add.jsp) 转载:http://blog.csdn.net/sprita1/article/details/7536023 js动态加载控件jsp页面,搜素材,soscw.com js动态加载控件jsp页面 标签:blog class c java tar ext 原文地址:http://www.cnblogs.com/sunrunzhi/p/3729486.html
var rowIndex = 0;
function
addOneLineOnClick() {
var
row=tblFlowCardDetail.insertRow(tblFlowCardDetail.rows.length);
var col =
row.insertCell(0);
col.innerHTML = "";
col =
row.insertCell(1);
col.innerHTML = "";
col = row.insertCell(2);
col.innerHTML = "";
row.setAttribute("id", "row" + rowIndex);
rowIndex++;
}
function
DeleteRow(rowTag){
var i =
tblFlowCardDetail.rows(rowTag).rowIndex;
var j;
for(j=i;j
tblFlowCardDetail.rows(j).cells(0).all("btnSelectAimClient").index--;
tblFlowCardDetail.rows(j).cells(2).all("btnSelectItem").index--;
}
tblFlowCardDetail.deleteRow(i);
rowIndex--;
}
cell0
cell1
cell2
例子2:
新闻标题
新闻副标题
新闻内容
新闻图片
新闻所属板块
var t = 1;
function
addFile()
{
var parent = document.getElementById("more");
var br =
document.createElement("br");
var input =
document.createElement("input");
var button =
document.createElement("input");
input.type = "file";
input.name = "uploadFile[" + (t++) +
"].file";
input.size = "30";
button.type = "button";
button.value = "删除";
button.onclick = function()
{
parent.removeChild(br);
parent.removeChild(input);
parent.removeChild(button);
};
parent.appendChild(br);
parent.appendChild(input);
parent.appendChild(button);
}
上一篇:spring的控制器如何获取参数