Movatterモバイル変換


[0]ホーム

URL:


  1. Tecnologia Web para desenvolvedores
  2. APIs da Web
  3. CharacterData

Esta página foi traduzida do inglês pela comunidade.Saiba mais e junte-se à comunidade MDN Web Docs.

View in EnglishAlways switch to English

CharacterData

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨julho de 2015⁩.

A interface abstrataCharacterData representa um objetoNode que contém caracteres. Esta é uma interface abstrata, o que significa que não há nenhum objeto do tipoCharacterData: ela é implementada por outras interfaces, comoText,Comment ouProcessingInstruction, que não são abstratas.

EventTarget Node CharacterData

Propriedades

Herda propriedades de seu pai,Node, e implementa as interfacesChildNode eNonDocumentTypeChildNode.

CharacterData.data

É umDOMString representando os dados textuais contidos neste objeto.

CharacterData.lengthSomente leitura

Retorna umunsigned long representando o tamanho da string contida emCharacterData.data.

NonDocumentTypeChildNode.nextElementSiblingSomente leitura

Returns theElement immediately following the specified one in its parent's children list, ornull if the specified element is the last one in the list.

NonDocumentTypeChildNode.previousElementSiblingSomente leitura

Returns theElement immediately prior to the specified one in its parent's children list, ornull if the specified element is the first one in the list.

Methods

Inherits methods from its parent,Node, and implements theChildNode andNonDocumentTypeChildNode interface.

CharacterData.appendData()

Appends the givenDOMString to theCharacterData.data string; when this method returns,data contains the concatenatedDOMString.

CharacterData.deleteData()

Removes the specified amount of characters, starting at the specified offset, from theCharacterData.data string; when this method returns,data contains the shortenedDOMString.

CharacterData.insertData()

Inserts the specified characters, at the specified offset, in theCharacterData.data string; when this method returns,data contains the modifiedDOMString.

ChildNode.remove()Experimental

Removes the object from its parent children list.

CharacterData.replaceData()

Replaces the specified amount of characters, starting at the specified offset, with the specifiedDOMString; when this method returns,data contains the modifiedDOMString.

CharacterData.substringData()

Returns aDOMString containing the part ofCharacterData.data of the specified length and starting at the specified offset.

Specifications

Specification
DOM
# interface-characterdata

Compatibilidade com navegadores

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp