嗯,问题也许不正确,但我给了一个拍摄。javascript通过url传递变量
我的脚本:
<a href="javascript:var%20u=location.href;window.open('http://localhost/url='+u);void(o)" onclick="return false">OMG, testing</a>
在现实,没有JavaScript网址看起来像:
http://localhost/url=google.com
在这里想补充一点:&格式= TXT
所以,正确的url然后将是:
http://localhost/url=google.com&format=txt
- 如何&格式添加到这表明在 顶部的JavaScript“脚本”?