Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo 'Hello'
- ?>
- <script src="jquery.js"></script>
- <script>
- $(function (){
- var id=10;
- $.ajax({
- url: 'jquery.php',
- data: { 'id' : id}, //send id
- success: function(data) {
- $('#stu_name').val(data.name);
- },
- dataType: 'json' //also can be xml
- });
- })
- </script>
- <form action='jquery.php' method='GET'>
- ID: <input type='text' name='id'>
- Name:<input type='text' name='stu_name'>
- </form>
Add Comment
Please, Sign In to add comment