AJAX Example

User Rating:  / 4
Category: AJAX
Created on Tuesday, 31 January 2012 21:23
Last Updated on Monday, 09 April 2012 08:44
Published on Tuesday, 31 January 2012 21:23
Written by Administrator
Hits: 6120

AJAX Example :

View source
<div id="myDiv"><h2>Let AJAX change this text</h2></div>
<button type="button" onclick="loadXMLDoc()">Change Content</button>

Next, add a <script> tag to the page's head section. The script section contains the loadXMLDoc() function:

View source
<script type="text/javascript">
function loadXMLDoc()
.... AJAX script goes here ...