<SCRIPT LANGUAGE="JavaScript">
// Simeon Warner - 14Apr98
// Here we are trying to find out what browser and version is being
// used to correct inconsistencies between versions.
browserName = navigator.appName;
browserVersion = parseInt(navigator.appVersion);
if ( browserName == "Netscape" ) {
if ( browserVersion < 4) {
document.write ("<body background=\"red_back_netscape3.gif\">")
}
}
// All other browsers will pick up the background outside the script
// tags. The second body definition will be ignored for browsers
// specified in this script (nasty but it works).
</script>
<body background="red_back.jpg" width=900 height=50
bgcolor=#ffffff link="#330000" vlink="#555555">
Points to notice:
<body background="red_back.jpg" width=900 height=50
bgcolor=#ffffff link="#330000" vlink="#555555"> after the
script will be picked up. This is the default.
<body ...> tags they
seem to take the first background specification they come to (I don't
think this is in the specification but it seems to work that way).
<body ...> tag
with the required background before the default tag. In this case
we look for Netscape version 3 or less. Of course more clauses
can be added.
[ Up ]