Javascript examples for DOM HTML Element:HR
The HR object represents an HTML <hr> element.
You can access a <hr> element by using getElementById():
<!DOCTYPE html> <html> <body> <hr id="myHR"> <button onclick="myFunction()">hide the HR element</button> <script> function myFunction() {/*from ww w .j ava 2 s .c o m*/ var x = document.getElementById("myHR"); x.style.display = "none"; } </script> </body> </html>