Re: [問題] mail內容提交到outlook 變成亂碼 贈3000P

看板Web_Design作者 (屁孩)時間9年前 (2015/02/05 23:36), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
先貼code: <html> <head> <script src="//code.jquery.com/jquery.min.js"></script> <script> $(function(){ $("input").on('keypress',change); $("textarea").on('keypress',change) $("input").on('change',change); $("textarea").on('change',change) $("form").on('submit',function(){ $("[name='name']")[0].value = encodeURIComponent($("#name")[0].value) $("[name='email']")[0].value = encodeURIComponent($("#email")[0].value) $("[name='message']")[0].value = encodeURIComponent($("#message")[0].value) }) }) function change(){ $("[name='"+this.id+"']")[0].value = encodeURIComponent(this.value) } </script> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <form method="post" enctype="text/plain" action="mailto:XXX"> <div ><input type="text" id="name" placeholder="Name" /></div> <input type="hidden" name="name"> <div><input type="text" id="email" placeholder="Email" /></div> <input type="hidden" name="email"> <textarea id="message" placeholder="Message" ></textarea> <input type="hidden" name="message"> <div><input type="submit" value="Send Message" /></div> </form> </body> </html> 反正基本上就是把送出的資料都改成urlencode就可以了,如果還有哪裡不行再告訴我, 我在想想該怎麼改。 --

01/29 21:03,
uu你......那個quake我超懷念
01/29 21:03

01/29 21:04,
我以前還在中出大學的時候,一天都練3hrs的QuakeIII
01/29 21:04

01/29 21:04,
 ̄ ̄
01/29 21:04

01/29 21:04,
結果後來南區比賽只拿第三名....遺憾
01/29 21:04

01/29 21:05,
那啥大學 詳細希望
01/29 21:05

01/29 21:05,
忙箱中出哪間大學
01/29 21:05
-- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 180.177.102.49 ※ 文章網址: https://www.ptt.cc/bbs/Web_Design/M.1423150580.A.A39.html

02/05 23:49, , 1F
解決了 太感謝您了T^T
02/05 23:49, 1F
文章代碼(AID): #1Kqutqev (Web_Design)
文章代碼(AID): #1Kqutqev (Web_Design)