📄 product.js
字号:
function closeWindow()
{
if(document.all)
window.opener=null;
else
window.open('','_parent','');
window.close();
}
function AddToCart(product_id,categoryid,colortype)
{
if(colortype!=null && colortype.value==-1)
{
alert('请选择颜色');
return false;
}
var url=null;
if(product_id==null || product_id<1)
url="cart.htm";
else
{
if(colortype!=null)
url="cart.htm?productid="+product_id+"&categoryid="+categoryid+"&colortype="+colortype.value+"&rnd="+Date.parse(new Date());//+"&reference_url="+escape(window.location.href);
else
url="cart.htm?productid="+product_id+"&categoryid="+categoryid+"&colortype=0&rnd="+Date.parse(new Date());
}
var popup=window.open(url,"shoppingcart");
popup.focus();
}
function AddSuitToCart(suitid)
{
var url=null;
if(suitid==null || suitid<1)
url="cart.htm";
else
{
url="cart.htm?suitid="+suitid+"&rnd="+Date.parse(new Date());
}
var popup=window.open(url,"shoppingcart");
popup.focus();
}
/*function AddSuitToCart(suitid,categoryid,itemcount)
{
var color = '';
for(var i =0;i<itemcount;i++)
{
var colortype = null;
if(i<10)
{
colortype= document.getElementById("rpProduct_ctl0"+i+"_ddlColorImg");
alert(colortype);
}
else
{
colortype= document.getElementById("rpProduct_ctl"+i+"_ddlColorImg");
alert(colortype);
}
if(colortype!=null && colortype.value==-1)
{
alert('请选择颜色');
return false;
}
else
{
color += color.value+',';
}
}
var url=null;
if( suitid ==null || suitid<1)
url="cart.htm";
else
{
url="cart.htm?suitid="+suitid+"&categoryid="+categoryid+"&colortype="+color+"&rnd="+Date.parse(new Date());
}
var popup=window.open(url,"shoppingcart");
popup.focus();
}*/
function ChangeImage(imgsrc)
{
document.getElementById("imgProduct").src = imgsrc.replace("_s30","_m");
}
function popZoom(url)
{
var name = 'Images';
var features= 'width=680,height=550,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes';
window.open(url,name,features);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -