向URL末尾添加查询字符串参数的辅助函数

来源:互联网 发布:淘宝主播刷人气 编辑:程序博客网 时间:2024/06/01 07:21
function addURLParam(url,name,value){  url += (url.indexOf('?')==-1 ? '?' : '&');  url += encodeURIComponent(name) + '=' + encodeURIComponent(value);  return url;}

0 0
原创粉丝点击