我在我的网址"http://www.google.com“上使用string.fromcharcode遇到了问题。
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.google.com">如果我尝试:
<meta HTTP-EQUIV="REFRESH" content="0; url=String.fromCharCode(104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 103, 111, 111, 103, 108, 101, 46, 99, 111, 109)">它不起作用。//编辑然后,如果我不能使用string.fromcharcode,我还能做什么来编码我的url?
发布于 2013-06-19 00:06:22
这属于script-tag,因为它是Javascript。参考:String.fromCharCode(),例如
<script type='text/javascript'>
string=String.fromCharCode(65,72,65)
console.log(string)
</script>也许你想使用location.href来引用另一个网站。
https://stackoverflow.com/questions/17173686
复制相似问题