![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRbghkaIgDT6M73f2xfHXy-Rh3H315gFcIbdMa5klRV2qAlA13OW0bglNg1acKcjuKo_iRtpiwLKlLEA2kJOO8SkV2dcvmPG0X_nVbbBGPJQeULMwg7SoAEgHcjfFntMgtX2eKXDW989Vj/s320/PicsArt_04-10-11.49.41.jpg)
Examples in Every Chapter In every chapter, you can edit the examples online, and click on a button to view the result.
<!DOCTYPE html> <html> <body> <div id="demo"> <h2>Let AJAX change this text</h2> <button type="button" onclick="loadDoc()">Change Content</button> </div> </body> </html>
The HTML page contains a <div> section and a <button>. The <div> section is used to display information from a server. The <button> calls a function (if it is clicked). The function requests data from a web server and displays it:
BalrajTemplatesfunction 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(); }
paragraph examples on html
ReplyDeleteP paragraph tag first-line font-size
BalrajTemplates
ReplyDelete