I’m using this java script to apply different styles to form element depending on what browser the visitor is using. How can I change the script so that I can specify different styles for Netscape 4.x and Netscape 6.x?
Code:
 <FORM>
    <SCRIPT>
      if (navigator.appName == 'Netscape') {
        document.write('<INPUT type="text" size=20>\n');
      } else {
        document.write('<INPUT type="text" size=30 class=”formstyle”>\n');
      }
    </SCRIPT>
    <NOSCRIPT>
      <INPUT type="text" size=20>
    </NOSCRIPT>
  </FORM>