html> head> title>无标题文档/title> meta http-equiv="Content-Type" content="text/html; charset=gb2312"> script language="javascript"> var curRow=null; var y=1;
function selectRow(){ var e=window.event; var tr1=e.srcElement; if(curRow) curRow.bgColor="#FFFFFF"; tr1.bgColor="e7e7e7"; curRow=tr1; } function addRow(src){ //alert(src); var newrow = src.insertRow(src.rows.length-1); newrow.attachEvent("onclick",selectRow); newrow.height=20; var i=4;
while(i--){ var newcell = newrow.insertCell();
switch(i){ case 0: newcell.innerHTML= 'input type="button" onClick="javascript:delRow(this.parentElement.parentElement)" value="删除此行">'+(y++); document.all.count.value=y-1; break; case 1:newcell.innerHTML=div2.innerHTML;break; case 2:newcell.innerHTML=div3.innerHTML;break; case 3:newcell.innerHTML=div4.innerHTML;break; default: newcell.innerHTML=div1.innerHTML;break;
} } //alert(newrow.outerHTML); }
function delRow(src){
var tab=src.parentElement; var i=tab.rows.length; var j=tab.rows.length; while(i--){ if(src==tab.rows[i]){ //alert("就是这行----"+ i); document.all.count.value=j-3; tab.deleteRow(i);
For i = 0 to UBound(arrayA) Response.Write "LI>" arrayc(i)"--"arrayb(i)"--"arrayA(i) Next '///////////////////写入xml文件 Dim objDom Dim objRoot Dim objChild1 Dim objChild2 Dim objChild3 dim objChild4 Dim objPI Dim PINode Set objDom = Server.CreateObject("Microsoft.XMLDOM") '/////写入样式 Set PINode=objDom.CreateProcessingInstruction("xml-stylesheet", "type='text/xsl'
href='list.xsl'") objDom.appendchild PINode '/////创建根接点 Set objRoot = objDom.createElement("kucunbiao")
objDom.appendChild objRoot Set objChild1 = objDom.createElement("jxname") objChild1.text=jxname
objRoot.appendChild objChild1
Set objChild2 = objDom.createElement("jxadd") objchild2.text=jxadd
objRoot.appendChild objChild2 set objChild3=objDom.createElement("jxtel") objChild3.text=jxtel objRoot.appendChild objChild3 set objChild4=objDom.createElement("kucun") objRoot.appendChild objChild4 For i = 0 to UBound(arrayA) Set objField = objDom.createElement("field")
'创建属性taborder。 Set objattTabOrder = objDom.createAttribute("taborder")
'追加field_value做为子元素的内容 objField.appendChild objFieldValue objField.appendChild objFieldValue1 objField.appendChild objFieldValue2 next Set objPI = objDom.createProcessingInstruction("xml","version='1.0'")
objDom.insertBefore objPI, objDom.childNodes(0)
objDom.Save "f:\xml\"jxname".xml" '//////////释放资源 Set objDom = Nothing Set objRoot = Nothing Set objField = Nothing Set objFieldValue = Nothing Set objattID = Nothing Set objattTabOrder = Nothing Set objPI = Nothing Set PINode=Nothing %> 3. 用xsl显示提交的xml,list.xsl