Javascript examples for DOM:Element nodeValue
Replacing an element on page using JavaScript
<html> <head> <script type="text/javascript"> var p = { onload: function() { var markerAttribute = document.createAttribute("marker"); document.getElementById("my").setAttributeNode(markerAttribute); markerAttribute.nodeValue = "config"; }/*from w w w .jav a 2s . c o m*/ }; </script> </head> <body onload="p.onload()"> <div> <player id="my"></player> </div> </body> </html>