怎么会这样的哦?
下面的代码:
<!--#include file="Conn.ASP"-->
<!--include file="char.inc"-->
<!--#include file="chkuser.asp" -->
<%
id=request("id")
if id="" then
id=0
else
id=id
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href=site.css rel=stylesheet>
<SCRIPT LANGUAGE="JavaScript" defer>
<!--
function runChgbgColor(TabID){
var obj=null;
function ChgbgColor(TabID){
var oRows=document.all(TabID).all.tags("TR");
for(var i=0;i<oRows.length;i++)
{
oRows[i].onmouseover=function(){
this.bgColor="#99CCFF";}
oRows[i].onmouseout=function(){
this.bgColor="#EAEAF4";}
oRows[i].onmousedown=function(){
this.bgColor="#EAEAF4";}
}
}
ChgbgColor(TabID);
}
//-->
</SCRIPT>
<SCRIPT language=JavaScript>
i=1;
function add(){
/*var i=2;
var row = DataTable.insertRow(i+1)
var cell = row.insertCell(0)
cell.innerHTML="jowing test"
row.style.backgroundColor="#FFFFFF"
cell = row.insertCell(1)
cell.innerHTML="<input name='Doctor' type='text' class='line_input' size='8' onmouseover='this.focus()'>"
row.style.backgroundColor="#FFFFFF"
*/
var newTR = DataTr.cloneNode(true);
newTR.id="a"+(++i)
DataTr.parentNode.insertAdjacentElement("beforeEnd",newTR);
RowReset()
}
function RowReset(){
var RowCount=MtvTab.rows.length-1
var ReName=RowCount-2
for (var i=0;i<MtvTab.rows[RowCount].cells.length;i++){
var str=MtvTab.rows[RowCount].cells[i].innerHTML
str=(str.replace(/name=[\d]*/i,"name="+ReName)).replace(/value=[\w]*/i,"value=''").replace(/(GetIncomeSum)\(\'0/i,"GetIncomeSum('"+ReName);
MtvTab.rows[RowCount].cells[i].innerHTML=str
}
}
function del(){
var c = document.getElementsByName('tt');
for(var i=0; i<c.length; i++)
if(c[i].checked)
MtvTab.deleteRow(i);
}
function ShortcutKey(){
if(window.event.keyCode==13)
add()
}
document.onkeydown=ShortcutKey;
</SCRIPT>
</head>
<body topmargin="0">
<table onMouseover="runChgbgColor('MtvTab')" id="MtvTab" style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=100% bgColor=#ffffff border=1>
<tr align="center" >
<td width="5%" background="images/default_05.gif"> ID</td>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql ="select * From bigtype where btxh=7 and btview=1 and btid=1 order by btorder"
rs.open sql,conn,1,3
do while not rs.eof
%>
<td width="5%" background="images/default_05.gif"> <%=rs("btsname")%></td>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</tr>
<%
Set rs1 = Server.CreateObject("ADODB.Recordset")
sql ="select * From smalltype where kid="&id&" order by id"
rs1.open sql,Conn,1,3
%>
<form name="form1" method="post">
<%
do while not rs1.eof %>
<tr id="DataTr" bgcolor="#EAEAF4" >
<td > <%=rs1("id")%></td>
<td > <input size="8"value="<%=rs1("kid")%>"></td>
<td >
<input size="8"value="<%=rs1("kname")%>"></td>
<td>
<input size="8" value="<%=rs1("kename")%>"></td>
<td>
<input size="8" value="<%=rs1("kbh")%>"></td>
</tr>
<%
rs1.movenext
loop
rs1.close
set rs1=nothing
%>
</form>
</table>
</body>
</html>
在Frontpage里测试代码没有错误。在IE浏览的时候提示这行var newTR = DataTr.cloneNode(true);对象不支持此属性或方法
麻烦高手看看。这是为什么?