Advertisement
Guest User

Untitled

a guest
May 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. $(document).ready(function () {
  2. var method;
  3. method = method || 'POST';
  4. var form = document.createElement("form");
  5. form.setAttribute("method", method);
  6. form.setAttribute("action", '/');
  7.  
  8.  
  9. var hiddenField = document.createElement("input");
  10. hiddenField.setAttribute("type", "hidden");
  11. hiddenField.setAttribute("name", 'joe');
  12. hiddenField.setAttribute("value", '31');
  13.  
  14. form.appendChild(hiddenField);
  15.  
  16. console.log(form);
  17. document.body.appendChild(form);
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement