Menu
In my index.html I have a little Javascript that detects the users platform I then want it to dynamically set the filename of the external css file that will be loaded.
This block refelcts my logic and should help illustrate what I am trying to do. I know the syntax is wrong here among other thing. But I think you’ll get the point.
<SCRIPT>
str = navigator.platform;
var computer = str.substring(0, 3)
if(computer == “Win”) {
<link rel=stylesheethref=”windows.css”type=”text/css”>
}
else {
<link rel=stylesheet href=”mac.css” type=”text/css”>}
</SCRIPT>