首页 > 代码库 > javascript function对象

javascript function对象

<html>    <body>        <script type="text/javascript">            Function.prototype.get_my_name = function(){                return this;            };             var func = function(){                this.my_name = ‘function name‘;            }            console.log(func.get_my_name());            console.log(func.my_name);//想明白为什么不能够输出my_name        </script>    </body></html>

 

javascript function对象