Advertisement
Guest User

Untitled

a guest
Aug 5th, 2015
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  5. <script type="text/javascript">
  6.  
  7. $(document).ready(function(){
  8.  
  9.    
  10.     $('#sigform').submit(function(){
  11.         $.ajax({
  12.                     type : 'GET',
  13.                     url : 'post.php',
  14.                     data : {text :$('#name').val(),phone:$('#phonenumber').val()},
  15.                     success:function(msg){
  16.                             alert(msg);
  17.                             }
  18.         }   );
  19.     });
  20. })
  21.  
  22. </script>
  23. </head>
  24.  
  25. <body>
  26. <form id="sigform">
  27.     <input type="text" value="name" id='name' />
  28.     <input type="text" value="phonenumber" id='phonenumber' />
  29.     <input type="submit" value="submit"/>
  30. </form>
  31. </body>
  32.  
  33. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement