?? 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 + -