<script language="JavaScript" type="text/javascript">
<!--
function ax(job,work,school){
this.job = job;
this.work = work;
this.school = school;
}
var bill = new ax('aa','bb')
alert(bill.job) //aa
alert(bill.constructor) //constructor 返回对创建此对象的函数的引用,即返回函数ax;
alert(ax.constructor)//返回Function
alert(bill.constructor == ax) //true;
alert(ax.constructor == Function) //true;
alert(typeof (bill.constructor)) //function
alert(bill instanceof ax) // true;
判断bill是不是ax对象的一个实例,如果是,则返回true;如果不是,则返回false;
//-->
</script>