📄 icare.js
字号:
// JavaScript Document
function ExtendTree()
{
var I;
var Class_Item;
if (GetCookie("Class"));
for(I=0;I<50;I++)//?ì2é50??×ó????
{
if (FindCookie(I))//?òμ??ò?1?a
{
Class_Item=eval("Class"+I);
Class_Item.style.display="";
}
}
}
function SwitchTree(Item) {//μ??¢?3×ó?????′DD??3ìDò
var bit;
var Class_Item;
bit=FindCookie(Item);//??cookie??ê?0,1£?0·μ??false,1·μ??true
Class_Item=eval("Class"+Item);
if (!bit) {//?1?a
Class_Item.style.display="";
SwitchCookie(GetCookieVal("Class"),Item)
}
else {//1?±?
Class_Item.style.display="none";
SwitchCookie(GetCookieVal("Class"),Item)
}
}
function FindCookie(Item)//??cookie??ê?0,1£?0·μ??false,1·μ??true
{
var ClassCookie;
if (ClassCookie=GetCookieVal("Class"))//?òμ???cookie
{
if (ClassCookie.charAt(Item)=="0")
{
return false;
}
else
{
return true;
}
}
else//???òμ???cookie£??¨á¢ò???3¤?è?a50μ?×?·?′?£?′ú±í50??éì?·×ó????
{
SetCookie ("Class","00000000000000000000000000000000000000000000000000")
return false;
}
}
function getCookieVal (offset)//è?cookie?μ
{ var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookieVal (name)//è?cookie?μ
{ var arg = name + "="; var alen = arg.length;
var clen = document.cookie.length;
var I = 0; while (I < clen)
{
var j = I + alen;
if (document.cookie.substring(I, j) == arg) return getCookieVal (j);
I = document.cookie.indexOf(" ", I) + 1;
if (I == 0) break;
} return null;
}
function SwitchCookie(Char,Item)//????cookie?3??μ??μ£?0±?1£?1±?0
{
var newchar;
if(Char.charAt(Item)=="0") newchar="1"; else newchar="0";
newchar=Char.substring(0,Item)+newchar+Char.substring(Item+1);
SetCookie ("Class", newchar);
}
function SetCookie (name, value) {
document.cookie = name + "=" + value + "expires = null";
}
function DeleteCookie (name,cval) { var exp = new Date(); exp.setTime
(exp.getTime() - 1); // This cookie is history var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
function GetCookie(name)
{
var cookieString=new String(document.cookie);
var cookieHeader=name;
var beginPosition=cookieString.indexOf(cookieHeader);
if (beginPosition!=-1)
return true;
else
return false;
}
function animate()
{
if (!display_G)
{
pic1.pixelLeft=document.body.clientWidth-guideman.width;
pic1.pixelTop=document.body.scrollTop;
}else
{
pic4.pixelLeft=document.body.clientWidth-arrow.width;
pic4.pixelTop=document.body.scrollTop;
}
}function display()
{
if (!display_G)
{
pic2.visibility='visible';
pic3.visibility='visible';
}
pic2.pixelLeft=pic1.pixelLeft+((guideman.width-cart.width)/2);
pic2.pixelTop=document.body.scrollTop+guideman.height-guideman.height/2;
pic3.pixelLeft=document.body.clientWidth-arrow.width;
pic3.pixelTop=document.body.scrollTop;
}
function MouseDown()
{
if (!display_G)
{
pic1.visibility='hidden';
pic2.visibility='hidden';
pic3.visibility='hidden';
pic4.visibility='visible';
SetCookie (C_Guidman,1);
display_G=true;
}else
{
pic1.visibility='visible';
pic2.visibility='visible';
pic3.visibility='visible';
pic4.visibility='hidden';
DeleteCookie(C_Guidman,1);
display_G=false;
}
}
function getwindowsize()
{
if (display_G)
pic4.visibility='visible';
guideman=new Image();
guideman.src="../image/guideman.gif";
cart=new Image();
cart.src="../image/cart.gif";
arrow=new Image();
arrow.src="../image/min.bmp";
document.onmousemove=animate;
}
function dispear(current){pic2.visibility='hidden';if (!display_G) pic3.visibility='hidden';
}
function openbag() {
openwindow("bag"); }
function cash() {
openwindow("cash"); }
function addupbag(id) {
openwindow("bag",id); }
function payinfo() {
openwindow("payinfo"); }
function discountinfo() {
openwindow("discountinfo"); }
function howbuy() {
openwindow("howbuy"); }
function openwindow(filename,id)
{ try
{pic2.visibility='hidden';
bagwin.close();
if (id)
bagwin=window.open(filename+".asp?id="+id,'bagwin',"height=420,width=640,left=140,top=10,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
else
bagwin=window.open(filename+".asp",'bagwin',"height=420,width=640,left=140,top=10,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
bagwin.focus();}
catch(exception)
{
if (id)
bagwin=window.open(filename+".asp?id="+id,'bagwin',"height=420,width=640,left=140,top=10,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
else
bagwin=window.open(filename+".asp",'bagwin',"height=420,width=640,left=140,top=10,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
bagwin.focus();}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -