• Skip to main content
  • Skip to search
  • Skip to select language
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Technology

      Web technology reference for developers

  • Guides
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • MDN Plus
    • Overview

      More MDN. Your MDN.

    • FAQ

      Frequently asked questions about MDN Plus

  • Already a subscriber?
  • Get MDN Plus
  1. 給開發者的網頁技術文件
  2. Web APIs
  3. DOMString

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

In this article

  • Specifications
  • 延伸閱讀

Related Topics

  1. Document Object Model
  2. DOMString
  3. Related pages for DOM
    1. AbortController
    2. AbortSignal (en-US)
    3. AbstractRange (en-US)
    4. Attr (en-US)
    5. CDATASection (en-US)
    6. CharacterData
    7. Comment (en-US)
    8. CustomEvent
    9. DOMError (en-US)
    10. DOMException (en-US)
    11. DOMImplementation (en-US)
    12. DOMParser
    13. DOMPoint (en-US)
    14. DOMPointReadOnly (en-US)
    15. DOMRect (en-US)
    16. DOMTimeStamp (en-US)
    17. DOMTokenList
    18. Document
    19. DocumentFragment
    20. DocumentType
    21. Element
    22. Event
    23. EventTarget
    24. HTMLCollection
    25. MutationObserver
    26. NamedNodeMap
    27. Node
    28. NodeIterator (en-US)
    29. NodeList
    30. ProcessingInstruction (en-US)
    31. Range
    32. StaticRange (en-US)
    33. Text (en-US)
    34. TextDecoder (en-US)
    35. TextEncoder (en-US)
    36. TimeRanges (en-US)
    37. TreeWalker (en-US)
    38. XMLDocument (en-US)

In this article

  • Specifications
  • 延伸閱讀

DOMString

DOMString 是編碼為 UTF-16 的字串。當 JavaScript 使用這類字串時, DOMString 會映射成一個 String.

傳送 null 給接受 DOMString 的 method 或參數時,會將其轉換成 "null"。

Specifications

Specification
Web IDL Standard
# idl-DOMString
Web IDL Standard
# es-DOMString

延伸閱讀

  • String
  • StringView – a C-like representation of strings based on typed arrays
  • Binary strings

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: 2022年5月24日, by MDN contributors

Your blueprint for a better internet.

  • MDN on Twitter
  • MDN on GitHub

MDN

  • About
  • Hacks Blog
  • Careers

Support

  • Product help
  • Report a page issue
  • Report a site issue

Our communities

  • MDN Community
  • MDN Forum
  • MDN Chat

Developers

  • Web Technologies
  • Learn Web Development
  • MDN Plus
  • Website Privacy Notice
  • Cookies
  • Legal
  • Community Participation Guidelines

Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2022 by individual mozilla.org contributors. Content available under a Creative Commons license.