Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/401.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何检查charCodeAt()是否可配置_Javascript_Firebug_Enumerable_Configurable - Fatal编程技术网

Javascript 如何检查charCodeAt()是否可配置

Javascript 如何检查charCodeAt()是否可配置,javascript,firebug,enumerable,configurable,Javascript,Firebug,Enumerable,Configurable,描述了如何使用Firebug/FF Web控制台检查innerHTML属性是否可配置和枚举。 如何检查charCodeAt函数的相同项Object.getOwnPropertyDescriptor(HTMLElement.prototype,“charCodeAt”) 返回未定义的 属于,而不是属于HTMLElement: Object.getOwnPropertyDescriptor(String.prototype,"charCodeAt") 属于,而不是HTMLElement: Obje

描述了如何使用Firebug/FF Web控制台检查
innerHTML
属性是否可配置和枚举。 如何检查
charCodeAt
函数的相同项
Object.getOwnPropertyDescriptor(HTMLElement.prototype,“charCodeAt”)
返回未定义的

属于,而不是属于
HTMLElement

Object.getOwnPropertyDescriptor(String.prototype,"charCodeAt")
属于,而不是
HTMLElement

Object.getOwnPropertyDescriptor(String.prototype,"charCodeAt")

这是因为
charCodeAt
不是
HTMLElement
的方法,而是
字符串中的方法(或者说是它的原型)


这是因为
charCodeAt
不是
HTMLElement
的方法,而是
字符串中的方法(或者说是它的原型)


上面说它在Firebug中不起作用。确保您使用的是FF web控制台,而不是Firebug。它说它在Firebug中不起作用。请确保您使用的是FF web控制台,而不是FireBug。它直接位于
字符串上,而不是
字符串上。prototype
@amnotiam非常确定它位于prototype中:P您认为
来自charcode
@amnotiam-您确定吗?当我使用
String.prototype时,它可以工作,但是
String
不能。(在Chrome上测试。)@Esailija,nnnnnn:你说得对。虽然在Firefox中,它也在
String
上+1是的,那是不标准的。Firefox还添加了Array.forEach等等。它直接在
String
上,而不是
String.prototype
@amnotiam非常确定它在prototype中:P你想的是
来自charcode
@amnotiam-你确定吗?当我使用
String.prototype时,它可以工作,但是
String
不能。(在Chrome上测试。)@Esailija,nnnnnn:你说得对。虽然在Firefox中,它也在
String
上+1是的,那是不标准的。Firefox还添加了Array.forEach等。@amnotiam它位于原型中,只检查
String
返回Chrome中未定义的example@amnotiam它位于原型中,例如,只检查
String
返回Chrome中未定义的