惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
爱范儿
爱范儿
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog
WordPress大学
WordPress大学
Jina AI
Jina AI
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
腾讯CDC
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
月光博客
月光博客
博客园 - Franky
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
雷峰网
雷峰网
小众软件
小众软件
H
Hackread – Cybersecurity News, Data Breaches, AI and More

博客园 - 努力&快乐

springboot 手动开启事务及手动提交事务 js MD5包含中文串时加密结果与JAVA结果不一致的解决方案 mongodb配置、启动、备份 JavaScript通过递归合并JSON linux系统关闭指定服务的方式 Dart 语言简易教程系列 查看java内存情况命令 JAVA用QRCode生成二维码 安装redis时Newer version of jemalloc required错误解决 代码指标工具 spring mvc接收ajax提交的JSON数据,并反序列化为对象 二进制样式的字符串与byte数组互转函数示例 .net运行时dll的查找路径顺序 WebStorm11 注册 MSSql使用SQL语句快速查看表对的就说明,及表字段描述及字段类型 多个App间传递数据 cordova混合开发:Android中native调用javascript cordova plugin数据传递概要 .Net事件管道详解图
javascript不用new关键字创建对象示例
努力&快乐 · 2016-01-29 · via 博客园 - 努力&快乐
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>无标题文档</title>
    <script language="JavaScript">
<!--
 
        function P(name) {
            if (!(this instanceof P))
                return new P(name);
            //return new P(arguments);
            //var _this = this === window ? {} : this;
            var _this = this;
            _this.name = name;
        }
 
        P.prototype.show = function () {
            alert(this.name + '_' + this.T);
        }
 
        P.prototype.T = '6'
 
        var a = new P('a');
        a.show();
        var b = P('b');
        b.show();
 
        a.show();
 
 
//-->
    </script>
</head>
 
<body>
</body>
</html>

posted on 2016-01-29 09:50  努力&快乐  阅读(945)  评论()    收藏  举报