常见组件对象的搞法

来源:互联网 发布:资产管理系统源码 编辑:程序博客网 时间:2024/05/22 05:03
<!DOCTYPE html><html>    <head>        <meta charset="UTF-8">        <title></title>        <script type="text/javascript">            function libin(a,b){                this.a=a;                this.b=b;                this.init();            }            libin.prototype.init=function(){                console.log(this.a+":"+this.b);                this.wocao();            }            libin.prototype.wocao=function(){                console.log("名字:"+this.a+","+"年龄:"+this.b);            }            var sb=new libin('李斌',25)        </script>    </head>    <body>    </body></html>

这里写图片描述

1 0