原文发布时间为:2008-11-08 —— 来源于本人的百度文章 [由搬家工具导入]

<html>
<head>
<title>js</title>
<script language="JavaScript">
   function Company(){
this.cname="aa";
this.products="bb";
}

function Sales(){
this.fromwhere="cc";
this.reps="50";
this.meth=disp;
}
Sales.prototype=new Company();
var t1="t1";
function disp(){
t2="t2";
var t3="t3";
document.write(this.reps+"<br>");
document.write(this.cname);
document.write(this.fromwhere);
document.write(this.products);
}
</script>
</head>
<body>
<script language="JavaScript">
var s1=new Sales();
s1.meth();
Sales.prototype.size="78";
document.write(t1);
document.write(t2);
document.write(t3);
</script>

</body>
</html>

<!--结果为
50
aaccbbt1t2
-->