Set oXMLItems = oXMLRoot.selectNodes("//item")第9行缺少对象怎么解决
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <%
Dim oXML, oXMLRoot, oXMLItems
set oXML = CreateObject("MSXML2.DOMDocument")
oXML.load Server.MapPath("bcaster.xml")
Set oXMLRoot = oXML.documentElement
Set oXMLItems = oXMLRoot.selectNodes("//item")
%>
<%
if(Trim(Request("AddNew")) = "Submit") then
Dim TmpNode
Set TmpNode = oXML.createElement("item")
TmpNode.setAttribute "item_url",Trim(Request("item_url"))
TmpNode.setAttribute "link",Trim(Request("link"))
TmpNode.setAttribute "itemtitle",Trim(Request("itemtitle"))
oXMLRoot.appendChild TmpNode
oXML.Save(Server.MapPath("bcaster.xml"))
end if
%>
<%
if(Trim(Request("WebMethod")) = "delete") then
Dim TmpNodes,Nodesss
Set TmpNodes = oXMLItems.item(Trim(Request("index")))
Set Nodesss = TmpNodes.parentNode
Nodesss.removeChild(TmpNodes)
oXML.Save(Server.MapPath("bcaster.xml"))
Response.end()
end if
%>
<%
if(Trim(Request("WebMethod")) = "edit") then
attrKey = split(Trim(Request("id")), "$")(0)
index = split(Trim(Request("id")), "$")(1)
oXMLItems.item(index).setAttribute attrKey, Trim(Request("value"))
oXML.Save(Server.MapPath("bcaster.xml"))
Response.Write(Trim(Request("value")))
Response.end()
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="http://code.
<script src="http://www.
<style type="text/css">
<!--
a{
color:blue;
}
form {
margin:0px;
padding:0px;
}
-->
</style>
</head>
<body>
<form action="" method="post">
<table width="880" border="1" cellpadding="4" cellspacing="2">
<tr>
<td style="width:30%">item_url</td>
<td style="width:30%">link</td>
<td style="width:35%">itemtitle</td>
<td style="width:5%">Edit</td>
</tr>
<%
For i = 0 To oXMLItems.length - 1
%>
<tr>
<td><div id="item_url$<%= i %>" class="edit"><%= oXMLItems.item(i).getAttribute("item_url") %></div></td>
<td><div id="link$<%= i %>" class="edit"><%= oXMLItems.item(i).getAttribute("link") %></div></td>
<td><div id="itemtitle$<%= i %>" class="edit"><%= oXMLItems.item(i).getAttribute("itemtitle") %></div></td>
<td><a href="javascript://" class="delete" index="<%= i %>">删除</a></td>
</tr>
<%
Next
%>
<tr>
<td><input type="text" name="item_url" id="item_url" /></td>
<td><input type="text" name="link" id="link" /></td>
<td><input type="text" name="itemtitle" id="itemtitle" /></td>
<td><input type="submit" name="AddNew" id="AddNew" value="Submit" /></td>
</tr>
</table>
<script type="text/javascript">
$(function(){
jQuery('.edit').editable("?WebMethod=edit", {width:120,submit : "保存", cancel : "取消",
/*onblur: 'submit',*/indicator : "正在更新...",tooltip : '单击进行编辑.'}, function(){/*update succeed*/});
jQuery('.delete').click(function(){
me = $(this);
$.post("?WebMethod=delete&index=" + me.attr("index"), function(d){
me.parent().parent().css({display:'none'});
});
});
});
</script>
</form>
</body>
</html>
Set oXMLItems = oXMLRoot.selectNodes("//item")第9行缺少对象怎么解决