Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $('#sigform').submit(function(){
- $.ajax({
- type : 'GET',
- url : 'post.php',
- data : {text :$('#name').val(),phone:$('#phonenumber').val()},
- success:function(msg){
- alert(msg);
- }
- } );
- });
- })
- </script>
- </head>
- <body>
- <form id="sigform">
- <input type="text" value="name" id='name' />
- <input type="text" value="phonenumber" id='phonenumber' />
- <input type="submit" value="submit"/>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement