Welcome 微信登录

首页 / 脚本样式 / JavaScript / 用js怎么把&字符换成"&amp:"

var re = /&/g;
var str = "http://www.163.com?id=333&r=999&o=000";

str.replace(re,"&");