del.asp

来自「免费实用家教网整站程序(奥运特别版) v1.5」· ASP 代码 · 共 19 行

ASP
19
字号
<!--#include file="Safety.asp"-->
<%
id = Request.Querystring("id")
sourceFile = Server.MapPath("Word.xml")
if id<>"" then
   Set source = Server.CreateObject("Microsoft.XMLDOM")
   'Set source = Server.CreateObject("Msxml2.DOMDocument")
   source.async = false
   source.load(sourceFile)
   Set currNode = source.selectSingleNode("xml/guestbook/item[id='" & id & "']")
   if Not IsNull(currNode) then
      currNode.parentNode.removeChild(currNode)
   End If  
   source.save(sourceFile)
Response.Write "<script>window.alert('删除成功!');window.location='admin.asp';</script>"
Response.End
end if
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?