<script> function Person(){} Person.prototype={ sayHello:function(){ document.write('hello,i am new '); } } var p=new Person(); p.sayHello(); </script> 结果