In Javascruot, I wanna use ajax method to write data into html files, but it doesnt work… who can help me with this,thank u^^
The code is shown below:
function Ajax_Write()
{
var data = "hello";
var url = "http://localhost:8080/myproject/A/chat.html";
var xhr = new XMLHttpRequest();
xhr.open("POST", url,true);
xhr.send(data);
alert("Send finished");
}
New contributor
洪子凡 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1