这是一段测试JS写的类的作用域的例子
你的代码中多了个",",或者写成
  <SCRIPT LANGUAGE="JavaScript">
  <!--
function testBtn()
{
var obj = new Object();
obj.prototype = {
testproto:function()
{
alert("prototype");
},
testproto1:function()
{
alert("testproto1");
}
}
alert("before");
//下一句错误
//obj.testproto();
alert("after");
alert(obj.prototype);
obj.prototype.testproto1();
}
testBtn();
  //-->
  </SCRIPT>