window.open()参数传递及获取

来源:互联网 发布:linux vi怎么保存 编辑:程序博客网 时间:2024/05/17 08:16

20161021

1、带参数打开新窗口


$window.open("/bdfence/bdfence-division/bdfence.html?vehicleId="+ id  );


2、获取参数


var afterUrl =  window.location.search.substring(1);(问号以后的字符串)


var afterEqual = afterUrl.substring(afterUrl.indexof('=')+1).toUpperCase();(等号以后的字符串,及你所要的参数)

0 2
原创粉丝点击