<html>
<head>
<script type="text/javascript">
function myClass()
{
//假设以下隐藏
this.name;
this.play = function()
{
//..
}
//假设以上隐藏
}
myobj = new myClass()
for(key in myobj){
document.write(key+":"+myobj[key].toString()+"<br>"
}
</script>
</head><body>
</body>
</html>
<head>
<script type="text/javascript">
function myClass()
{
//假设以下隐藏
this.name;
this.play = function()
{
//..
}
//假设以上隐藏
}
myobj = new myClass()
for(key in myobj){
document.write(key+":"+myobj[key].toString()+"<br>"
}
</script>
</head><body>
</body>
</html>
<head>
<script type="text/javascript">
function myClass()
{
//假设以下隐藏
this.name;
this.play = function()
{
//..
}
//假设以上隐藏
}
myobj = new myClass()
for(key in myobj){
document.write(key+":"+myobj[key].toString()+" <br>");
}
</script>
</head> <body>
</body>
</html>
{
this._name="hello";
}
window.alert(classA.toString());
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<script type="text/javascript">
<!--
function myClass(a){
this.a=a;
alert("OK");
}
alert(myClass.toString());
//-->
</script>
</head>
<body>
</body>
</html>
for(i in o)
{
alert("o["+i+"]="+o[i]);
}