Latest web development tutorials

HTML DOM isSupported method

Elements Object Reference Element object

Examples

Analyzing the button element supports version 2.0 kernel features:

var item=document.getElementsByTagName("BUTTON")[0];
item.isSupported("Core","2.0");

Output:

true

try it"

Definition and Usage

isSupported () method is used to determine whether the current node supports a feature.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support isSupported method

Note: Internet Explorer 8 and earlier versions of IE does not support this method.


grammar

node.isSupported(feature,version)

parameter

参数 类型 描述
feature String 必须。定义了你想要检查是否支持的特性
version String 可选。定义了你想检查是否支持的版本。

return value

类型 描述
Boolean 如果支持该特性返回 true, 否则返回false。

technical details

DOM version Core Level 2 Node Object


Elements Object Reference Element object