Stefan Bach: IE Browserabfrage

Beitrag lesen

Hallo,

if(navigator.userAgent.match("MSIE") && !navigator.userAgent.match("Opera"))

Wie wäre es mit

<script type="text/javascript">
  if(document.all && ! window.opera) {
    document.write('<img src="bild1.png" alt="" />');
  }
  else {
    document.write('<img src="bild2.png" alt="" />');
  }
</script>
<noscript>
  <img src="bild1.png" alt="" />
</noscript>

Allerdings sind die alt Attribute nicht zum Spaß da, da sollte man schon was reinschreiben.

Viele Grüße,

Stefan

--
Lass dir das Tanzen NICHT verbieten
http://tanzverbot.de