< html > < head > < title > study 012 </ title > < script language ="JavaScript" type ="text/javascript" > ... function Card(name, address, work, home)...{ this.name = name; this.address = address; this.workphone = work; this.homephone = home; this.Print = PrintCard;}function PrintCard()...{ document.write( "姓名:" + this.name + "<br> " + "地址:" + this.address + "<br> " + "办公电话:" + this.workphone + "<br> " + "家庭电话:" + this.homephone + "<br> " );} </ script > </ head > < body > < p > < script language ="JavaScript" type ="text/javascript" > ... my = new Card("小马", "北京 中关村73号", "28321882", "45327312-002");my.Print(); </ script > </ p > </ body > </ html >