1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[test] test case for ajax taken from w3schools

This commit is contained in:
Witold Filipczyk 2022-09-08 17:11:29 +02:00
parent fb30cb3bf4
commit 924ffc6eae
2 changed files with 27 additions and 0 deletions

23
test/ecmascript/ajax.html Normal file
View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<body>
<div id="demo">
<h2>The XMLHttpRequest Object</h2>
<button type="button" onclick="loadDoc()">Change Content</button>
</div>
<script>
function loadDoc() {
const xhttp = new XMLHttpRequest();
xhttp.onload = function() {
document.getElementById("demo").innerHTML =
this.responseText;
}
xhttp.open("GET", "ajax_info.txt");
xhttp.send();
}
</script>
</body>
</html>

View File

@ -0,0 +1,4 @@
<h1>AJAX</h1>
<p>AJAX is not a programming language.</p>
<p>AJAX is a technique for accessing web servers from a web page.</p>
<p>AJAX stands for Asynchronous JavaScript And XML.</p>