1234567891011121314151617181920212223242526272829303132333435 |
- <html>
- <head>
- <script>
- var today = new Date();
- var expiry = new Date(today.getTime() + 30 * 24 * 3600 * 1000); // plus 30 days
- function setCookie(name, value)
- {
- document.cookie=name + "=" + escape(value) + "; path=/; expires=" + expiry.toGMTString();
- }
- function putCookie(form)
- //this should set the UserName cookie to the proper value;
- {
- setCookie("userName", form[0].usrname.value);
- return true;
- }
- </script>
- </head>
- <body>
- <form method="post" action="/example" class="delete_member_form">
- <h2>delete_member</h2>
- <div>
- <label>帳號</label>
- <input type="text" id="del_username" name="del_username" placeholder="請輸入帳號">
- <input type="button" value="Go!" id="submit" onclick="putCookie(document.getElementsByTagName('form'));">
- </form>
- </body>
- </html>
|