Javascript examples for DOM HTML Element:Input Date
Display element by date
<html> <head> <script type="text/javascript"> window.onload = function()/*from w ww .j ava2 s. c o m*/ { var currentTime = new Date() var month = currentTime.getMonth() + 1 var day = currentTime.getDate() if(month == 10) { document.getElementById("my").style.display = 'block'; } else { document.getElementById("my").style.display = 'none'; } } </script> </head> <body> <h1 id="my" style="display:none">Day 1</h1> </body> </html>