Get DFN Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:DFN


The DFN object represents an HTML <dfn> element.

You can access a <dfn> element by using getElementById():

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<dfn id="myDFN">Definition term</dfn>

<button onclick="myFunction()">set the color of the definition term</button>

function myFunction() {/*from w w  w. j  a v a2  s  .co  m*/
    var x = document.getElementById("myDFN"); = "blue";


Related Tutorials