0
how can I make an event calender
event calender
3 Respuestas
0
that one displays the date. what I need is to present an event calender inside a div element.
- 1
An event handler is used to process events that occur on the page, such as the user clicking a button:
<!DOCTYPE html>
<html>
<body>
<button onclick="document.getElementById('demo').innerHTML=Date()">The time is?</button>
<p id="demo"></p>
</body>
</html>
- 1
That's simple enough, give your div an id and replace 'demo' with it. for instance:
<!DOCTYPE html>
<html>
<body>
<button onclick="document.getElementById('box').innerHTML=Date()">Press me to appear in the div</button>
<div id="box"></div>
</body>
</html>
and replace the 'date()' with whatever you want to place in the div, whether it to be an image, text, variable etc...