First create hello.php and insert this code
<?php //echo "responce from server";
echo $_POST['cname'];
?>
then you need to create an index page with name index.html is as follows
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script language="javascript" src="jquery.js"></script>
<script language="javascript">
function getvalues()
{
$.ajax({
type: "POST",
url: "hello.php",
data: "id=hi&cname=india",
async: false,
success: function(data){
//$("#Content").html='';
//$("#Content").html(data.output);
//alert('hello');
alert(data);
}
});
}
getvalues();
</script>
</head>
<body>
</body>
</html>
then you run this script and getting to know how Jquery works
<?php //echo "responce from server";
echo $_POST['cname'];
?>
then you need to create an index page with name index.html is as follows
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script language="javascript" src="jquery.js"></script>
<script language="javascript">
function getvalues()
{
$.ajax({
type: "POST",
url: "hello.php",
data: "id=hi&cname=india",
async: false,
success: function(data){
//$("#Content").html='';
//$("#Content").html(data.output);
//alert('hello');
alert(data);
}
});
}
getvalues();
</script>
</head>
</body>
</html>
Now you are going to get jqury.js ( This is download from net also)
then you run this script and getting to know how Jquery works
No comments:
Post a Comment