<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>
时间: 2024-12-21 14:29:40