Home > Web Front-end > JS Tutorial > body text

JavaScript中constructor()方法的使用简介_基础知识

WBOY
Release: 2016-05-16 15:56:23
Original
1413 people have browsed it

 JavaScript Boolean.constructor()方法返回一个引用到创建实例的原型布尔函数。
语法

boolean.constructor()

Copy after login

返回值:

  • NA

下面是参数的详细信息:

返回创建此对象的实例。
例子:

<html>
<head>
<title>JavaScript constructor() Method</title>
</head>
<body>
<script type="text/javascript">
 var bool = new Boolean( );
 document.write("bool.constructor() is:"+bool.constructor); 
</script>
</body>
</html>

Copy after login

这将产生以下结果:

bool.constructor() is : function Boolean() { [native code] }

Copy after login


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!