mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-06 23:44:43 -04:00
24 lines
411 B
HTML
24 lines
411 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
|
|
<div id="demo">
|
|
<h2>The XMLHttpRequest Object</h2>
|
|
<button type="button" onclick="loadDoc()">Change Content</button>
|
|
</div>
|
|
|
|
<script>
|
|
function loadDoc() {
|
|
var xhttp = new XMLHttpRequest();
|
|
xhttp.onload = function() {
|
|
document.getElementById("demo").innerHTML =
|
|
xhttp.responseText;
|
|
}
|
|
xhttp.open("GET", "ajax_info.txt");
|
|
xhttp.send();
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|