AJAX
How do I make an ajax?
What is a ajax? How do you make a ajax? This script and codes were developed by Beau Carnes on 13 September 2022, Tuesday.
AJAX - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>AJAX</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>AJAX with JavaScript!</h1>
<p id="demo">Let AJAX change this text</p>
<button type="button" onclick="loadDoc()">Change Content</button> <script src="js/index.js"></script>
</body>
</html>
AJAX - Script Codes CSS Codes
p { font-size: 30px;
}
AJAX - Script Codes JS Codes
// AJAX = Asynchronous JavaScript And XML
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", "https://crossorigin.me/http://carnes.cc/code/ajax_example.txt", true); xhttp.send();
}
/*
Adding "https://crossorigin.me" prevents the following error:
XMLHttpRequest cannot load http://carnes.cc/code/ajax_example.txt. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://s.codepen.io' is therefore not allowed access.
*/
Developer | Beau Carnes |
Username | beaucarnes |
Uploaded | September 13, 2022 |
Rating | 3 |
Size | 1,919 Kb |
Views | 38,456 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Graphs | 2,222 Kb |
Bar Chart - D3 | 3,411 Kb |
A Pen by Beau Carnes | 2,118 Kb |
Trie | 2,086 Kb |
Internet Dungeon Game | 12,502 Kb |
Calculator | 2,246 Kb |
Tic-tac-toe | 3,041 Kb |
Const vs Let vs Var | 1,500 Kb |
Heaps | 1,976 Kb |
Common Array Methods | 1,490 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Amazing CSS Menu with Notification Badges | Faizanasad | 2,549 Kb |
Welcome | Nakome | 6,076 Kb |
Z-index demo | Kblh | 1,534 Kb |
A Pen by Alex Edwards | Exards | 8,218 Kb |
Image grid with captions | Mchernin34 | 2,222 Kb |
CSS Heart Loaders | Nourabusoud | 2,161 Kb |
Pure CSS Animated Photo Stack | Depthdev | 2,486 Kb |
Project MMetro beta | Atomicsong | 5,157 Kb |
CSS- UI Element States Pseudo-Classes | Tesla809 | 2,206 Kb |
Draggable directive | YahyaKacem | 2,277 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!