March 8, 2000 - Detecting Stylesheets
March 8, 2000|
Tips: March 2000
Yehuda Shiran, Ph.D.
<SPAN ID="test" STYLE="position: absolute;"></SPAN>
The following variable determines whether or not stylesheets are enabled, by checking the livelihood of the above
var style = ((NS4 && document.test) || IE4) ? 1 : 0;
NS4 is true when the Netscape Navigator version is 4 and up. IE4 is true when the Internet Explorer version is 4 and up as well.
Learn more about the application that uses this technique in Column 16, Dynamic Tooltips.