use typeof  operator, for example
if (typeof(YourVariable) == "object")
{
//...
}

解决方案 »

  1.   

    there is a little difference in vbs IsObject vs. js typeof:
    e.g. array, date...
      

  2.   

    Javascript:
    The typeof operator returns type information as a string. There are six possible values that typeof returns: "number," "string," "boolean," "object," "function," and "undefined."VBScript:
    IsObject Function
    Returns a Boolean value indicating whether an expression references a valid Automation object.
      

  3.   

    http://www.blueidea.com/bbs/archivecontent.asp?id=472344一般有几种typeof(IE1+) constructor(IE2+) instanceof(IE5+)等等