Javascript Reference
Categories: Element

javascript Element outerHTML

@Aug. 17, 2009, 9:41 a.m.
outerHTML Firefox/Netscape/NN n/a IE 4 Chrome/Safari/DOM n/a  

 

Read/Write  
 

Indicates the rendered text and HTML tags (i.e., all source code), including the start and end tags, of the current element. If you want only the rendered text, see outerText. For the source code that excludes the current element's tags, see innerHTML. A change to this property that includes HTML tags is rendered through the HTML parser, as if the new value were part of the original source code. You may change this property only after the document has fully loaded, and, in the process, you can even change the type of element it is or replace the element with straight text content. Changes to the outerHTML property are not reflected in the source code when you view the source in the browser. To add to existing HTML, see the insertAdjacentHTML( ) method. This property is not supported in many objects in the Macintosh version of IE 4. The W3C DOM equivalent requires extensive manipulation of node-level objects.

 
Example
 
document.getElementById("elementID").outerHTML =
    "<acronym id="quotes">NI<i>M</i>BY</acronym>";
 
Value

String that may or may not include HTML tags.

 
Default

Empty string.

Under moderation.
EddieTroks - 26 hours

Good day! I know this is kinda off topic nevertheless I'd figured I'd ask. Would you be interested in exchanging links or maybe guest authoring a blog post or vice-versa? My website discusses a lot of the same topics as yours and I think we could greatly benefit from each other. If you happen to be interested feel free to send me an email. I look forward to hearing from you! Superb blog by the way!
look at my page
https://zvukiknig.info/user/TangelaBurdine/ dolori articolari rimedi naturali
https://another-ro.com/forum/profile.php?id=44810 farmaco per dolori articolari
https://www.oasiskorea.net/Brand/13404215 dolori alle articolazioni rimedi

@776=
EddieTroks - 31 hours
Under moderation.
EddieTroks - 42 hours

Powered by Linode.