666
//点击从当前页面开始传递goodsID----
$(document).on("tap",".goodImg",function(){
var tmpGoodId = $(this).attr("goodId");
window.location.href="shangpin.html?goodsID="+tmpGoodId+"";
});
-------shangping.html页面获取goodsID;
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)($|&)");
var strArr = window.location.search.substr(1).match(reg);
if(strArr != null) return unescape(strArr[2]);
return null;
}
var goodsID=getUrlParam('goodsID')//-----------调用函数将goodsID反回给goodsID;