if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","t1.txt",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseText;
xmlhttp.open("w","t1.txt");
xmlhttp.writeln('hai');
xmlhttp.close();
console.log(xmlDoc);Run Code Online (Sandbox Code Playgroud)
我将读取t1.txt文件使用XMLHttpRequest(),如何在t1.txt的同一文件中写入更多文本
javascript ×1