28,409
社区成员




<table width="80%" border="0" align="center" cellpadding="3" cellspacing="1" class="tab">
<tr>
<td colspan="4" class="title">在线客服设置</td>
</tr>
<tr class="shadow">
<td height="22" nowrap="nowrap"><strong>序号</strong></td>
<td><strong>类型</strong></td>
<td><strong>帐号(必填)</strong></td>
<td><strong>客服名称</strong></td>
</tr>
<tr>
<td></td>
<td><select name="Type" id="Type">
<option value="qq">QQ</option>
</select>
</td>
<td><input type="text" name="Account" id="Account" value="" /></td>
<td><div>
<input name="DisplayName" type="text" id="DisplayName" value="" size="40" />
</div></td>
</tr>
<%
if request("act")="add" then
dim I
I=I+1
%>
<tr>
<td></td>
<td><select name="Type2" id="Type2">
<option value="qq">QQ</option>
</select></td>
<td><input type="text" name="Account2" id="Account2" value="" /></td>
<td><div>
<input name="DisplayName2" type="text" id="DisplayName2" value="" size="40" />
</div></td>
</tr>
<tr>
<%
end if
%>
<HTML>
<TITLE>Form Object example</TITLE>
<HEAD>
<script language="javascript">
function delrow1()
{
var oElement=event.srcElement;
while(oElement.tagName!="TR")
{
oElement=oElement.parentElement;
}
var oTBody=oElement.parentElement;
oTBody.removeChild(oElement)
}
function delrow2()//刪除当前行
{
var currRowIndex=event.srcElement.parentNode.parentNode.rowIndex;
document.all.yltable.deleteRow(currRowIndex);//table10--表格id
}
function insertrow1() //增加的一行方法1
{
var newnode = document.getElementById('yltable').lastChild.cloneNode(true);
document.getElementById('yltable').appendChild(newnode);
}
function inserttable()
{
var newnode = document.getElementById('yltable').cloneNode(true);
document.getElementById('ylform').appendChild(newnode);
}
</script>
</HEAD>
<BODY>
<form name="ylform" id="ylform">
<center>
<input name="button" type="button" onClick="inserttable()" value="增加表格">
<input name="button2" type="button" onClick="insertrow1()" value="增加一行">
</center>
<table border="1" align="center" width="50%" id="yltable">
<tr class="shadow">
<td width="30%" height="22" nowrap="nowrap"><strong>序号</strong></td>
<td width="40%"><strong>类型</strong></td>
<td width="40%"><strong>帐号(必填)</strong></td>
<td width="40%"><strong>删除</strong></td>
</tr>
<TBODY id=yl1>
<tr>
<td width="30%" height="22"><div align="center"><select name="Type" id="Type">
<option value="qq">QQ</option>
</select></div></td>
<td><input type="text" name="Account" id="Account" value="" /></td>
<td><div>
<input name="DisplayName" type="text" id="DisplayName" value="" size="40" />
</div></td>
<td width="40%><div align="center">
<input name="button3" type="button" onClick="delrow1()" value="删除">
</div></td>
</tr>
</TBODY>
<TBODY id=yl2>
<tr>
<td><div align="center"><select name="Type" id="Type">
<option value="qq">QQ</option>
</select></div></td>
<td><input type="text" name="Account" id="Account" value="" /></td>
<td><div>
<input name="DisplayName" type="text" id="DisplayName" value="" size="40" />
</div></td>
<td><div align="center">
<input name="button3" type="button" onClick="delrow1()" value="删除">
</div></td>
</tr>
</TBODY>
</table>
<center>
</center>
</form>
</BODY>
</HTML>