PHP jQuery Example

This page discusses - PHP jQuery Example

PHP jQuery Example

PHP jQuery Example

jQuery:  jQuery is a JavaScript library which accentuates interaction between JavaScript and HTML.

Main features of jQuery are as follows:

  • Ajax
  • CSS manipulation
  • DOM element
  • Events
  • Extensibilty
  • Utilities ....etc.

In this tutorial you will come to know about basic feature of jQuery with the help of an example.

First of all we need to download jquery.js (latest version ) file from www.jquery.com and place this file into the directory where you will develop the php files.

Example:

<html>

<head>

<script type="text/javascript" src="jquery.js"> </script>

<script type="text/javascript">

function dispContent()

{

$.ajax({

url:"jquery.js",

success:function(data)

{

$("#content").html(data);

}

});

}

</script>

</head>

<body>

<p>

<center>

<input type="button" value="click" onclick="dispContent();">

<br/>

<textarea id="content" rows="10" cols="50"></textarea>

</center>

</body> 0

</html>

 

  1