home / experts / javascript / column6 |
|
Object detection is great, but JavaScript is more than just objects and properties -- it features functions and methods as well. Suppose you want to define a regular expression, but regular expressions are only supported in fourth-generation browsers. The easiest and most reliable way to check if the user's browser supports regular expressions is to find out if it supports the
* This object detection routine does not work with Internet Explorer 4.0 PR1 (Preview Release 1).
Note that the parent of all functions is the When dealing with methods you should obviosly specify the method's full path, including its parent object. Here's an example:
|
Created: November 4, 1997
Revised: December 4, 1997
URL: http://www.webreference.com/js/column6/method.html