<a onclick="go_url(ENCODED-URL);return false;">go to this url</a>
发布于 2009-09-30 14:48:20
decodeURI()
函数对用encodeURI()
函数编码的URI进行解码。
encodeURI()
函数将字符串编码为URI。
与escape()
和unescape()
不同,这些函数是专门为处理URI编码/解码而设计的。
发布于 2009-09-30 14:41:14
你是说像这样的东西?
<script type="text/javascript">
function go_url(url) {
var u = '';
for (var i = 0; i < url.length; i++) {
u += String.fromCharCode(url.charCodeAt(i) ^ 7);
}
window.location.href = u;
}
</script>
<a href="#" onclick="go_url('ossw=((ppp)`raaf)dhj');return false;">yeah</a>
发布于 2009-09-30 14:32:01
encodeURI(编码地址);
https://stackoverflow.com/questions/1500959
复制相似问题