THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Variable Object


Variable Object

The Variable article speaks to a HTML <var> element.

Access a Variable Object

You can get to a <var> component by utilizing getElementById():

var x = document.getElementById("myVar");

Create a Variable Object

You can make a <var> component by utilizing the document.createElement() method:

var x = document.createElement("VAR");