<script>
function myObj(){
this.p1=0;
this.show=showProp
}
function showProp(){
for(ob in this)alert(ob+"="+this[ob]);
}
var myObj1 = new myObj()
myObj1.p1="value";
myObj1.show()
</script>
function myObj(){
this.p1=0;
this.show=showProp
}
function showProp(){
for(ob in this)alert(ob+"="+this[ob]);
}
var myObj1 = new myObj()
myObj1.p1="value";
myObj1.show()
</script>
<script>
function myObj(){}
myObj.prototype.p1=0
function myObj.prototype.show(){
for(ob in this)alert(ob+"="+this[ob]);
}
var myObj1 = new myObj()
myObj1.p1="value";
myObj1.show()
</script>
<!--
function String.prototype.trim()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
alert(" abcd ".trim());
//-->
</SCRIPT>