ff3/ff4下会显示两t个重复的代码
function writeCookie(name, value) {
exp = new Date();
exp.setTime(exp.getTime() + (86400 * 1000 * 30));
document.cookie = name + "=" + escape(value) + "; expires=" + exp.toGMTString() + "; path=/";
document.cookie.replace("stylesheet=css0","stylesheet="+value);
}
function readCookie(name) {
var search;
search = name + "=";
offset = document.cookie.indexOf(search);
if (offset != -1) {
offset += search.length;
end = document.cookie.indexOf(";", offset);
if (end == -1){
end = document.cookie.length;
}
return unescape(document.cookie.substring(offset, end));
}else{
return "";
}
}