Javascript examples for DOM HTML Element:DFN
The DFN object represents an HTML <dfn> element.
You can access a <dfn> element by using getElementById():
<!DOCTYPE html> <html> <body> <dfn id="myDFN">Definition term</dfn> <button onclick="myFunction()">set the color of the definition term</button> <script> function myFunction() {/*from w w w. j a v a2 s .co m*/ var x = document.getElementById("myDFN"); x.style.color = "blue"; } </script> </body> </html>