输入banner图图片脚本导航/分类

用js怎么把&字符换成"&amp:"_javascript技巧

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

str.replace(re,"&");