码迷,mamicode.com
首页 > 编程语言 > 详细

javascript 面向对象OOP笔记

时间:2017-11-01 17:27:11      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:blog   html   oop   pre   lan   meta   script   asc   type   

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>OOP</title>
    <script type="text/javascript">
        function myOOP() {
            alert(this.a);
            alert(this.b);
        }
        var a = 12;
        window.b = 2;
        window.onload = function()
        {
            var c = [1,2,3,4,5,6];
            var d = 7;
            c.e = 8;
            c.f = function () {
                alert(this.e);
            };
            c.f();
            this.myOOP();
            window.myOOP();
            myOOP();
        };
    </script>
</head>
<body>
</body>
</html>

 

javascript 面向对象OOP笔记

标签:blog   html   oop   pre   lan   meta   script   asc   type   

原文地址:http://www.cnblogs.com/fengyouqi/p/7767438.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!