Skip to content
Related Articles

Related Articles

Improve Article

HTML | DOM inputEncoding Property

  • Last Updated : 25 Jul, 2019

The inputEncoding property returns the character encoding used for parsing the document. This property doesn’t have any default value.




  • The HTML DOM inputEncoding property does not require any parameter.

    Return Value:

  • The HTML DOM inputEncoding property returns a String which represens the document’s character encoding.


    <!DOCTYPE html>
          HTML | DOM inputEncoding Property
          Click the button to check the
          encoding of this document
        <button onclick="geek()">
            Alert document's encoding
            function geek() {
                var docEncoding = document.inputEncoding;

    Output :
    Before clicking the button:

    After clicking the button:

    Supported Browsers: The browser supported by DOM inputEncoding() Property are listed below:

    • Google Chrome
    • Internet Explorer 9.0+
    • Firefox
    • Opera 15.0+
    • Safari

    Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

    My Personal Notes arrow_drop_up
  • Recommended Articles
    Page :