« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 8 of about 8 for classList (0.001 sec.)
Dom\TokenList::contains — 指定されたトークンがリストに含まれるかを返す | PHP 8.... 11513
Dom\TokenList::contains (PHP 8 >= 8.4.0) Dom\TokenList::contains — 指定されたトークンがリストに含まれるかを返す 説明 public function Dom\TokenList::contains ( string $token ): bool token がリストに含まれるかを返します。 パラメータ token トー ... ocument :: createFromString ( '<p class="font-bold important"></p>' , LIBXML_NOERROR ); $p = $dom -> body -> firstChild ; $classList = $p -> classList ; var_dump ( $classList -> contains ( 'important' ), $classList -> contains ( 'font-small' ), ); ?> 上の ...
https://man.mtool.work/php/8.3/dom-tokenlist.contains.html
Dom\TokenList::item — リストからトークンを返す | PHP 8.3 11278
Dom\TokenList::item (PHP 8 >= 8.4.0) Dom\TokenList::item — リストからトークンを返す 説明 public function Dom\TokenList::item ( int $index ): ? string リストの index に存在するトークンを返します。 パラメータ index トークンのインデックス 戻り ... ocument :: createFromString ( '<p class="font-bold important"></p>' , LIBXML_NOERROR ); $p = $dom -> body -> firstChild ; $classList = $p -> classList ; var_dump ( $classList -> item ( 0 ), $classList -> item ( 100 ), ); ?> 上の例の出力は以下となります。 ...
https://man.mtool.work/php/8.3/dom-tokenlist.item.html
Dom\TokenList::toggle — リスト中のトークンの存否を切り換える | PHP 8.3 10501
Dom\TokenList::toggle (PHP 8 >= 8.4.0) Dom\TokenList::toggle — リスト中のトークンの存否を切り換える 説明 public function Dom\TokenList::toggle ( string $token , ? bool $force = null ): bool リスト中の token の存否を切り換えます。 パラメータ ... ocument :: createFromString ( '<p class="font-bold important"></p>' , LIBXML_NOERROR ); $p = $dom -> body -> firstChild ; $classList = $p -> classList ; $classList -> toggle ( 'font-bold' , 'font-small' ); $classList -> toggle ( 'important' , force : true ...
https://man.mtool.work/php/8.3/dom-tokenlist.toggle.html
Dom\TokenList::add — 指定されたトークンをリストに追加する | PHP 8.3 9724
Dom\TokenList::add (PHP 8 >= 8.4.0) Dom\TokenList::add — 指定されたトークンをリストに追加する 説明 public function Dom\TokenList::add ( string ...$tokens ): void 指定された tokens をリストに追加しますが、 既に存在しないものに限ります。 パラ ... グラフ要素に、クラスを2つ追加します。 <?php $dom = Dom\HTMLDocument :: createEmpty (); $p = $dom -> createElement ( 'p' ); $classList = $p -> classList ; $classList -> add ( 'font-bold' , 'important' ); echo $dom -> saveHtml ( $p ); ?> 上の例の出力は以下と ...
https://man.mtool.work/php/8.3/dom-tokenlist.add.html
Dom\Element クラス | PHP 8.3 7717
Dom\Element クラス (PHP 8 >= 8.4.0) はじめに 要素を表します。 このクラスは、 DOMElement と同等ですが、 モダンかつ仕様に準拠しています。 クラス概要 class Dom\Element extends Dom\Node implements Dom\ParentNode , Dom\ChildNode { /* 継承した定数 ... Name ; public readonly string $ tagName ; public string $ id ; public string $ className ; public readonly Dom\TokenList $ classList ; public readonly Dom\NamedNodeMap $ attributes ; public readonly ? Dom\Element $ firstElementChild ; public readonly ? Do ... localName 要素のローカル名 tagName 要素の大文字化されたHTML修飾名 className スペースで分割された、要素のクラスを表す文字列 classList この要素のクラスを簡単に管理するための、 Dom\TokenList を返します。 attributes この要素の属性を表す Dom\NamedNodeMap のイン ...
https://man.mtool.work/php/8.3/class.dom-element.html
Dom\TokenList::remove — リストから、指定されたトークンを削除する | PHP 8.3 7265
Dom\TokenList::remove (PHP 8 >= 8.4.0) Dom\TokenList::remove — リストから、指定されたトークンを削除する 説明 public function Dom\TokenList::remove ( string ...$tokens ): void リストから、指定された tokens を削除しますが、 存在しない場合は無 ... nt :: createFromString ( '<p class="font-bold important"></p>' , LIBXML_NOERROR ); $p = $dom -> body -> firstChild ; $p -> classList -> remove ( 'font-bold' , 'important' ); echo $dom -> saveHtml ( $p ); ?> 上の例の出力は以下となります。 <p class=""></p> ...
https://man.mtool.work/php/8.3/dom-tokenlist.remove.html
Dom\TokenList::replace — リスト中のトークンを別のものに置き換える | PHP 8.3 7157
Dom\TokenList::replace (PHP 8 >= 8.4.0) Dom\TokenList::replace — リスト中のトークンを別のものに置き換える 説明 public function Dom\TokenList::replace ( string $token , string $newToken ): bool リスト中のトークンを別のものに置き換えます。 パ ... nt :: createFromString ( '<p class="font-bold important"></p>' , LIBXML_NOERROR ); $p = $dom -> body -> firstChild ; $p -> classList -> replace ( 'font-bold' , 'font-small' ); echo $dom -> saveHtml ( $p ); ?> 上の例の出力は以下となります。 <p class="font- ...
https://man.mtool.work/php/8.3/dom-tokenlist.replace.html
Dom\HTMLElement クラス | PHP 8.3 7049
Dom\HTMLElement クラス (PHP 8 >= 8.4.0) はじめに HTML 名前空間内の要素を表します。 クラス概要 class Dom\HTMLElement extends Dom\Element { /* 継承した定数 */ public const int Dom\Node::DOCUMENT_POSITION_DISCONNECTED = 0x1 ; public const int ... Name ; public readonly string $ tagName ; public string $ id ; public string $ className ; public readonly Dom\TokenList $ classList ; public readonly Dom\NamedNodeMap $ attributes ; public readonly ? Dom\Element $ firstElementChild ; public readonly ? Do ...
https://man.mtool.work/php/8.3/class.dom-htmlelement.html
PREV 1 NEXT