兼容浏览器的不同编码页之间的数据传递

一个utf-8编码的网页下有一个表单需要将数据抛送到另外一个GB2312编码的网页中
———————————————
UTF-8编码网页

1
2
3
4
5
<html>
<form  accept-charset="GB2312" onsubmit="if(navigator.appName=='Microsoft Internet Explorer')document.charset='GB2312'" action="http://iask.com/og" name="f" method="get" target="_blank">
---input内容----
</form>
</html>

———————————————
———————————————
GB2312编码的http://iask.com/og

1
2
3
<html>
----网页内容---
</html>

———————————————
是不是很简单,有时也很实用。

RELATIVE

与本文相关的日志

No Response to 兼容浏览器的不同编码页之间的数... »

还没有任何评论。

Leave a Reply

Email address is not published

You should say a Chinese word to pass spam check. If you can not input Chinese, just copy 你好 and paste them into comment text box.