编辑下面的代码:【加编码】
<html> <body> <script> function employee(name,jobtitle,born) { this.name=name; this.jobtitle=jobtitle; this.born=born; } var fred=new employee("Fred Flintstone","Caveman",1970); employee.prototype.salary=null; fred.salary=20000; document.write(fred.salary); </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂