post.html :
<html>
<head><meta charset="GBK"/><title></title><script>function totest(){var parm1="你好";var myurl="read.html"+"?"+parm1;// encodeURI 编码window.location.assign(encodeURI(myurl));}</script>
</head>
<body><input type="button" value="post" onClick="totest()"/>
</body>
</html>
read.html :
<html>
<head><title></title><script>window.onload = function(){var url = decodeURI(window.location.search).slice(1);document.getElementById("read").innerHTML=url;};</script>
</head>
<body>
<div id="read"></div>
</body>
</html>
注: slice(1) 方法可以截取从第一个字符开始的字符串,否则得到的值的第一个字符会有一个 '?' 符号。