87,994
社区成员
发帖
与我相关
我的任务
分享function removeSource(id){
var path=unescape(document.location.pathname);
path=path.substring(1,path.lastIndexOf("/")+1);
var doc = new ActiveXObject("MSXML2.DOMDocument.3.0");
doc.async = false;
doc.load(path+"data.xml");
var items=doc.getElementsByTagName("items")[0];
items.removeChild(items.childNodes[id]);
var fso, filehandle;
fso = new ActiveXObject("Scripting.FileSystemObject");
filehandle = fso.CreateTextFile(path+"data.xml", true);
filehandle.Write(doc.xml);
filehandle.Close();
}