Welcome aboard! We are happy you are here and wish you good net-raft!
<html>
<body>
<button type="button" onclick="loadfile()">click</button>
<div id="test"></div>
<script>
function loadfile() {
str = "is cool!";
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("test").innerHTML = decodeURIComponent(this.responseText);
}
};
xhttp.open("GET", "/project/User1/sl_jlvL8ZStJd2021113413/php.php?t=" + str, true);
xhttp.send();
}
</script>
</body>
</html>
The most helpful AJAX solutions