JavaScript Tutorial/DOM Node/outerHTML — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:24, 26 мая 2010
Set outerHTML (Firefox does not support the outerHTML.)
<source lang="javascript">
<html> <head> <title>OuterHTML Example</title> <script type="text/javascript"> function useOuterHTML() {
var oDiv = document.getElementById("div1");oDiv.outerHTML = "
This is a paragraph
";} </script> </head> <body>
This is my original text
<input type="button" value="Use OuterHTML" onclick="useOuterHTML()" /> </body> </html></source>