1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| function Navigateur(){
var IE = false;
var AUTRE = false;
var intSplitStart = navigator.userAgent.indexOf("(",0);
var intSplitEnd = navigator.userAgent.indexOf(")",0);
var strChStart = navigator.userAgent.substring(0,intSplitStart);
var strChMid = navigator.userAgent.substring(intSplitStart, intSplitEnd);
var strChEnd = navigator.userAgent.substring(strChEnd);
if ((strChMid.indexOf("MSIE 8") != -1) || (strChMid.indexOf("MSIE 7") != -1) || (strChMid.indexOf("MSIE 6") != -1)){
SetCss("css/StyleIE.css");
} else {
SetCss("css/Style.css");
}
}
function SetCss(Lien) {
var fileref=document.createElement("link");
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", Lien);
document.getElementsByTagName("head")[0].appendChild(fileref);
} |
Partager