[thelist] javascript syntax

.jeff jeff at members.evolt.org
Thu May 9 15:05:28 CDT 2002


darren,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: dn at dittodesign.co.uk
>
> > a regular expression search on the navigator.platform.
>
> er ?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

don't sweat it.  a regular expression isn't even necessary.  just test for
the substring "mac" within the platform property using the indexOf() method.

if(navigator.platform.toLowerCase().indexOf('mac') == -1)
// do something if we find the
// substring "mac" in the platform
// property

good luck,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/





More information about the thelist mailing list