Last updated on April 25th, 2012 at 09:20 pm

Guys here we are gonna see how we can load another webpage content using jquery, very simple to use.

Here is the code of “test.html” file

<head>
<title>Content Showing Script</title>
<script type="text/javascript" src="jquery-1.2.6.js"></script>
<script type="text/javascript">
function content()
{
$.ajax({
url : "getpage.php",
success : function (data) {
$("#content").html(data);
}
});
}
</script>
</head>
<body>
Get The Content<br><input type="button" value="Get Data" onClick="
content();"><br><textarea id="content" rows="10? cols="50?></textarea>

2. Edit the GETPAGE.PHP page and add this script

<?php
echo "This is a test Page<br>";
echo "From Mistonline.in <br>";
?>

Hope this tutorial helped you a lot.Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *