Advertisement
BLUSHIF

Untitled

Oct 17th, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <form id ="form">
  2. <p>Name:</p>
  3. <input name="field1" type="text" id ="name" />
  4. <h3>&nbsp;</h3>
  5. <p>Message:</p>
  6. <textarea name="field2" type="text" id ="message"></textarea><br/>
  7. <button onclick="pos();">reply</button>
  8. </form>
  9. </td>
  10. </table>
  11. </div>
  12. <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  13. <script type="text/javascript">
  14. function pos(){
  15. var values=$("form").serialize();
  16. $.post('form.php', values, function(response) {
  17. console.log("Response: "+response);
  18. });}
  19. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement