标题:下面这段代码有错误吗?为什么在浏览器显示的是空白页面
取消只看楼主
新一x
Rank: 2
等 级:论坛游民
帖 子:6
专家分:20
注 册:2012-3-27
结帖率:50%
 问题点数:0 回复次数:0 
下面这段代码有错误吗?为什么在浏览器显示的是空白页面
<script type="text/javascript">
        
           function member(name,gender)
           {
              this.name=name;
              this.gender=gender;
           }
            
           function showproperty(obj,objstring)
           {
              var str="";
              for(var i in obj)
              {
                str+=objString+"."+i+"="+obj[i]+"<br>";
              }
              return str;
           }
         
           person1=new member("zhangsan","男");
            
           person2=new member("lisi","女");
         
           document.write(showproperty(person1,"person"));
           document.write(showproperty(person2,"person"));
         
           
       </script>
搜索更多相关主题的帖子: javascript function 浏览器 return member 
2013-06-17 22:52



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-415432-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.491359 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved