您当前的位置: 首页 > 

暂无认证

  • 3浏览

    0关注

    92582博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

js中获取对象类型

发布时间:2020-09-11 12:20:33 ,浏览量:3

<!DOCTYPE html> <html> <head> <title> </title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <script type="text/javascript"> let qq=new Object(); console.log(typeof qq); let arr=new Array(); console.log(typeof arr); console.log(arr.constructor.name); function Person() { this.name = "lnj"; this.age = 34; this.say = function () { console.log(this.name, this.age); } } let p = new Person(); console.log(p.constructor.name); console.log(typeof p); </script> </body> </html> 
关注
打赏
1653961664
查看更多评论
立即登录/注册

微信扫码登录

0.0855s