I m 采用少量随机处理法,动态装上CSS文档:
var cookie = $.cookie( necgroupcolour , { path: / });
if (cookie == null) {
var rnd = Math.floor(Math.random() * 3);
$.cookie( necgroupcolour , rnd, { path: / });
}
switch ($.cookie( necgroupcolour , { path: / })) {
case "0":
$( head ).append( <link rel="stylesheet" type="text/css" href="/css/purple/HomeMaster.css" /> );
break;
case "1":
$( head ).append( <link rel="stylesheet" type="text/css" href="/css/blue/HomeMaster.css" /> );
break;
case "2":
$( head ).append( <link rel="stylesheet" type="text/css" href="/css/green/HomeMaster.css" /> );
break;
default:
$( head ).append( <link rel="stylesheet" type="text/css" href="/css/purple/HomeMaster.css" /> );
}
该公司在Porin、Safat、Khat,但不是在E8或以下公司工作。
在通过Fiddler进行操作并检查来文方时,你发现没有CSS档案被装上。
Any ideas how I could solve this?