delete_member_test.html 914 B

1234567891011121314151617181920212223242526272829303132333435
  1. <html>
  2. <head>
  3. <script>
  4. var today = new Date();
  5. var expiry = new Date(today.getTime() + 30 * 24 * 3600 * 1000); // plus 30 days
  6. function setCookie(name, value)
  7. {
  8. document.cookie=name + "=" + escape(value) + "; path=/; expires=" + expiry.toGMTString();
  9. }
  10. function putCookie(form)
  11. //this should set the UserName cookie to the proper value;
  12. {
  13. setCookie("userName", form[0].usrname.value);
  14. return true;
  15. }
  16. </script>
  17. </head>
  18. <body>
  19. <form method="post" action="/example" class="delete_member_form">
  20. <h2>delete_member</h2>
  21. <div>
  22. <label>帳號</label>
  23. <input type="text" id="del_username" name="del_username" placeholder="請輸入帳號">
  24. <input type="button" value="Go!" id="submit" onclick="putCookie(document.getElementsByTagName('form'));">
  25. </form>
  26. </body>
  27. </html>