DOMStringList: contains() メソッド
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
contains()
メソッドは、指定された文字列がリスト内にあるかどうかを示す論理値を返します。
構文
js
contains(string)
引数
string
-
リスト内に存在するかどうかを調べたい文字列。
返値
指定された文字列がリストにあるかどうかを示す論理値です。
例外
TypeError
-
引数が指定されなかった場合に発生します。
仕様書
Specification |
---|
HTML # dom-domstringlist-contains |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
contains |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.