主题:
3024-night
ambiance-mobile
ambiance
base16-dark
blackboard
cobalt
eclipse
erlang-dark
lesser-dark
mbo
mdn-like
midnight
monokai
neat
neo
night
paraiso-dark
pastel-on-dark
rubyblue
solarized
the-matrix
tomorrow-night-eighties
vibrant-ink
新窗口
视图:
左侧面板
HTML
CSS
JS
预览
F11(全屏显示选中的编辑器)
查看更多帮助信息
相关文章:
JavaScript constructor 属性详解
代码类型:
默认(HTML/CSS/JS)
HTML混合(单页)
PHP
Java
C#
C++
C
SQL
杂项:
启用CSS/JS语法检查
监测脚本运行错误
禁止库文件重复
文档类型:
HTML5
HTML 4.01 Strict
HTML 4.01 Transitional
HTML 4.01 Frameset
XHTML 1.0 Strict
XHTML 1.0 Transitional
XHTML 1.0 Frameset
无
JS库文件:
无
jQuery 1.11.1
jQuery 2.1.1
jQuery 1.10.2
jQuery 1.9.1
jQuery 1.8.3
jQuery 1.7.2
jQuery 1.6.4
jQuery 1.5.2
jQuery 1.4.4
jQuery 1.3.2
jQuery 1.2.6
手动添加:
//在当前页面内追加换行标签和指定的HTML内容 function w( html ){ document.body.innerHTML += "<br/>" + html; } //字符串:String() var str = "张三"; w( str.constructor ); // function String() { [native code] } w( str.constructor === String ); // true // 数组:Array() var arr = [1, 2, 3]; w( arr.constructor ); // function Array() { [native code] } w( arr.constructor === Array ); // true // 数字:Number() var num = 5; w( num.constructor ); // function Number() { [native code] } w( num.constructor === Number ); // true // 自定义对象:Person() function Person(){ this.name = "CodePlayer"; } var p = new Person(); w( p.constructor ); // function Person(){ this.name = "CodePlayer"; } w( p.constructor === Person ); // true // JSON对象:Object() var o = { "name" : "张三"}; w( o.constructor ); // function Object() { [native code] } w( o.constructor === Object ); // true // 自定义函数:Function() function foo(){ alert("CodePlayer"); } w( foo.constructor ); // function Function() { [native code] } w( foo.constructor === Function ); // true // 函数的原型:bar() function bar(){ alert("CodePlayer"); } w( bar.prototype.constructor ); // function bar(){ alert("CodePlayer"); } w( bar.prototype.constructor === bar ); // true