返回到:JavaScript对象:JavaScript String 对象
constructor 属性返回对 String 对象属性创建的函数。
string.constructor
所有主要浏览器都支持 constructor 属性。
返回 String 对象属性创建的函数:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Web176教程(Web176.com)</title> </head> <body> <script> var txt = "Hello Web176.com!"; document.write(txt.constructor); </script> </body> </html>