HTML DOM Samp Object

Samp Object The Samp object represents an HTML <samp> element. Access a Samp Object You can access a <samp> element by using getElementById(): Example var x = document.getElementById(“mySamp”); Try it Yourself » Create a Samp Object You can create a <samp> element by using the document.createElement() method: Example var x = document.createElement(“SAMP”); Try it Yourself » Standard […]

HTML DOM Superscript Object

Superscript Object The Superscript object represents an HTML <sup> element. Access a Superscript Object You can access a <sup> element by using getElementById(): Example var x = document.getElementById(“mySup”); Try it Yourself » Create a Superscript Object You can create a <sup> element by using the document.createElement() method: Example var x = document.createElement(“SUP”); Try it Yourself » Standard […]