请问javascript可写数据吗? 本人现在想用javascript读写数据,比如读写txt,xml文件等,用javascript读xml文档已经实现,但写xml文档一直不行,请问javascript可以写数据吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以 调fso或其他组件但要有权限 可以,写完调用save方法保存即可 <script> function additem(){ var xmldom = new ActiveXObject("Microsoft.XMLDOM"); xmldom.async = false; xmldom.load("youxmlfile.xml"); var xnode = xmldom.documentElement.createElement("Item"); xnode.text = "abc"; var newAtt = xnode.createAttribute("ID"); newAtt.text = "A"; xmldom.documentElement.appendChild(xnode); alert(xmldom.xml); } </script> Ext Combobox问题,一直loading,一直加载中.... 对象不支持此属性或方法 如何用javascript获得页面一个元素的值 jquery 怎么抓取数组中的第n个元素? 除了document.onclick,还有什么 动态宽度与高度的textarea 如何用一个按钮控制是否允许页面自动刷新? 写个正则,帮忙? JavaScript宝典(第四版)e文原电子版 有多少人要 为何我使用 templateprinter 会有 permission denied 关于document.context 请问有MAC OS X上开发dashboard widget的达人能解答这个问题吗?
可以 调fso或其他组件但要有权限
function additem(){
var xmldom = new ActiveXObject("Microsoft.XMLDOM");
xmldom.async = false;
xmldom.load("youxmlfile.xml");
var xnode = xmldom.documentElement.createElement("Item");
xnode.text = "abc";
var newAtt = xnode.createAttribute("ID");
newAtt.text = "A";
xmldom.documentElement.appendChild(xnode);
alert(xmldom.xml);
}
</script>