判斷Browser是IE還是FireFox
// IE navigator.appName = "Microsoft Internet Explorer" navigator.appVersion = 4// FireFox navigator.appName = "Netscape" navigator.appVersion = 5
IE4 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4);
NN4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);
後續使用方法:
if (IE4) xxxxxxxxxxxxxxxx;
else if (NN4) xxxxxxxxxxxxxx;
頁:
[1]