如何使用JavaScript安全地对URL进行编码,以便将其放入GET字符串?
var myUrl = "http://example.com/index.html?param=1&anotherParam=2";
var myOtherUrl = "http://example.com/index.html?url=" + myUrl;
Run Code Online (Sandbox Code Playgroud)
我假设你需要myUrl在第二行编码变量?
我想知道如何在同一个链接上传递多个参数。
我想在链接 window.open(" http://www.av.com "+parm5,")上也传递参数 4我该怎么写。
详细说明
我想在值提示中传递值,例如输出应该看起来像 (para4=12/23/2013 & para5=12/29/2013)
//MicroStrategy/servlet/mstrWeb?Server=gm0&Project=gmai+Production+Enterprise&Port=0&evt=2048001&src=mstrWeb.2048001&documentID=75DBCE17448CC18BB73B808303FC01A8¤tView0Media=2&vis2030301A8¤tViewMedia=2&vis201203000000000000001&src=mstrWeb.2048001&documentID=75DBCE17448CC18BB73B808303F