简体   繁体   English

在URL中传递JavaScript参数

[英]Pass in javascript param in URL

I'm trying to back end this and maybe get lucky modifying the url, what happens is there is javascript code that loads specific data and I want to be able to pass in the script via the URL. 我正在尝试解决这个问题,并且可能很幸运地修改了URL,发生的事情是有加载特定数据的javascript代码,我希望能够通过URL传递脚本。 Is this possible and how would i do it? 这可能吗,我该怎么办?

For example here is the javascript: javascript:ChangeEvsVol('1035','3') here is the urL: https:///app/template/simple%2CDownloadQuotasScreen.vm 例如,这里是javascript: javascript:ChangeEvsVol('1035','3')这里是urL: https:///app/template/simple%2CDownloadQuotasScreen.vm

Is there a way to manipulate the URL to use that param? 有没有一种方法可以操纵URL使用该参数? I throw in into Firebug command console and it grabs exactly what I need. 我进入Firebug命令控制台,它正好抓住了我所需要的。

document.location ="mysite.php?var1=" + JSvar1 +"&var2=" + JSvar2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM