Vous êtes sur la page 1sur 2

VU4F1516056

Experiment No. 7
Aim: - Design a registration form using AJAX.

Program:-

<!DOCTYPE html>

<html>

<body>

<div id="demo">

<h1>Click the button below for information on AJAX</h1>

<button type="button" onclick="loadDoc()">Change Content</button>

</div>

<script>

function loadDoc() {

var xhttp = new XMLHttpRequest();

xhttp.onreadystatechange = function() {

if (this.readyState == 4 && this.status == 200) {

document.getElementById("demo").innerHTML =

this.responseText;

};

xhttp.open("GET", "ajax_info.txt", true);

xhttp.send();
}

</script>

</body>

</html>

Output:-

Conclusion: - A registration form has been designed using AJAX.

Vous aimerez peut-être aussi