There should never be big enough differences between Windows and OS X to need to have separate style sheets, but here's some JS that says it does it (no idea how old it is):
Like I said, I have no idea how old the code is, nor if it actually works.
I will repeat though, there should be no reason that you will need different style sheets depending on the operating system. Why do you need to do this?
Can anyone write a javascript, that would check the "navigator.platform" for string "win"? But making it lowercase before checking :D (so that it would surely find windows os :D )
I only want to show this to the visitor, when browsing under windows (not a text :D ):
I know that there's this html code:
<!--[if IE]>
Hi, you're using ie!
<![endif]-->
But is there an html code "when using windows"? Like the previous code only say's:
"Hi, you're using ie!"
when the visitor is browsing under ie, But is there a code that say's something when browsing under windows? e.g.: [sorry for the example :D ]
<!--[if windows]>
Hi, you're using windows!
<![endif]-->
Thank you!!
http://www.netobjects.com/workbench/js_css.html
http://www.netobjects.com/workbench/js_css.html
but under windows (firefox), under Debian (iceweasel) it gives the following (the same):
document.writeln(“â€) } else { document.writeln(“â€) }
I will repeat though, there should be no reason that you will need different style sheets depending on the operating system. Why do you need to do this?
and then use some sort of if statement to target windows users.
http://www.netobjects.com/workbench/js_css.html
http://www.java2s.com/Tutorial/JavaScri ... atform.htm
http://www.javascripter.com/faq/operatin.htm
http://www.web-wise-wizard.com/javascri ... ation.html
Ok, so there could be a way... :D
Can anyone write a javascript, that would check the "navigator.platform" for string "win"? But making it lowercase before checking :D (so that it would surely find windows os :D )
I only want to show this to the visitor, when browsing under windows (not a text :D ):
<div align="center"><font size=4><table width="100%"><tr><td>under windows</td></tr></table></font></div>
thank you :D
<html>
<head>
</head>
<body>
<script language="JavaScript">
if (navigator.platform.toLowerCase().indexOf(“win”)!=-1)
{
<div align="center"><font size=4><table width="100%"><tr><td>under windows</td></tr></table></font></div>
}
</script>
</body>
</html>
<html>
<head>
<title>
</title>
</head>
<body>
<script language="JavaScript" type="text/javascript">
if (navigator.platform.toLowerCase().indexOf("win")!=-1)
{
document.write(navigator.platform.toLowerCase());
document.write( unescape( '%3C%62%72%20%2F%3E' ) );
document.write( unescape( '%3C%66%6F%6E%74%20%73%69%7A%65%3D%34%3E%3C%74%61%62%6C%65%20%77%69%64%74%68%3D%22%31%30%30%25%22%20%62%67%63%6F%6C%6F%72%3D%22%23%65%65%65%65%65%65%22%3E%3C%74%72%20%2F%3E%3C%74%64%20%2F%3E%79%6F%75%27%72%65%20%75%73%69%6E%67%20%77%69%6E%64%6F%77%73%3C%74%64%20%2F%3E%3C%74%72%20%2F%3E%3C%74%61%62%6C%65%20%2F%3E%3C%66%6F%6E%74%20%2F%3E' ) );
}
</script>
</body>
</html>