直接编码
复制代码代码如下所示:
为避免与jQuery冲突,将元素包含两个$
函数({){ $
返回document.getelementbyid(S);
}
功能setblue(){
写
/ / writecookie(iscssstyle
创建一个新的CSS文件
Suoyuan(maincss)。href =CSS / crm_blue使用。;
主框架页面,并重置CSS文件
/ /无功childobj = window.parent.document.getelementbyid(managermain ContentWindow);
/ / childobj.document.getelementbyid(maincss)。href =CSS / crm_blue使用。;
}
功能setgreen(){
写
/ / writecookie(iscssstyle
创建一个新的CSS文件
$('maincss)。href = CSS CSS /客户关系管理;
主框架页面,并重置CSS文件
/ /无功childobj = window.parent.document.getelementbyid(managermain ContentWindow);
/ / childobj.document.getelementbyid(maincss)。href =CSS / CRM使用。;
}
功能setgray(){
写
/ / writecookie(iscssstyle
创建一个新的CSS文件
$('maincss)。href = CSS / crm_gray CSS;
主框架页面,并重置CSS文件
/ /无功childobj = window.parent.document.getelementbyid(managermain ContentWindow);
/ / childobj.document.getelementbyid(maincss)。href =CSS / crm_gray使用。;
}


功能setactivestylesheet(标题){
var,主;
(i = 0; / /(a document.getelementsbytagname(链接);{我})我+ +)
{ /
/ /如果(a.getattribute(关系),IndexOf(风格)!= 1 a.getattribute(标题))
{ /
/ / a.disabled =真;
/ /如果(a.getattribute(标题)= =标题)
/ / a.disabled = false;
}
}
/ / $(maincss )Attr(href。
/ / $('maincss)。href = CSS / crm_blue CSS;
设置CSS文件
$('maincss href =标题);
}
功能getactivestylesheet(){
var,i,a;
(i = 0; / /(a document.getelementsbytagname(链接);{我})我+ +)
{ /
/ /如果(a.getattribute(关系),IndexOf(风格)!= 1
/ / a.getattribute(标题)a.disabled)!
回归/ a.getattribute(标题);
}
返回null;
var cssFile = $('maincssHref);
/ /警报(cssFile);
返回cssFile;
}
功能getpreferredstylesheet(){
var,i,a;
(i = 0; / /(a document.getelementsbytagname(链接);{我})我+ +)
{ /
/ /如果(a.getattribute(关系),IndexOf(风格)!= 1
/ / a.getattribute(关系),IndexOf(ALT)= = 1
/ / a.getattribute(标题))
回归/ a.getattribute(标题);
}
返回null;
var cssFile = $('maincssHref);
/ /警报(cssFile);
返回cssFile;
}
功能createCookie(名称,价值,天){
如果(天){
日期=新日期();
Date.setTime(date.gettime()+(天* 24 * 60 * 60 * 1000));
VaR到期=;到期=+ date.togmtstring();
}
其他的
过期= ;
document.cookie =姓名+=+价值+到期+;路径= / ;


}
功能writecookie(名称,价值,小时,ESCP){
过期;
如果(小时)!= NULL){
到期日期(=新(新的日期()),GetTime()小时×3600000);
过期= ;到期=+ expire.togmtstring();
}
如果(ESCP = = true){
document.cookie =姓名+=+价值+到期;
{人}
document.cookie =姓名+=+逃跑(价值)+到期;
}
}


功能readcookie(name){
变量nameEQ =姓名+=;


Var ca = document.cookie.split(';');


对于(var i = 0;i < ca.length;i++){
var;


而(c.charat(0)= =)
C = c.substring(1,c.length);
如果(c.indexOf(nameEQ)= = 0)
返回c.substring(nameeq.length,c.length);
}
返回null;
}
$(文档)Ready(函数(){)


/ / var title= readcookie(iscssstyle );
/ / var title=CSS / crm_blue使用。;


(如果)!=空标题!=未定义){
/ / setactivestylesheet(标题);
/