Wednesday, 10 May 2017

js event

<html>
<body>
<p id='para'>no will display here</p>
<button onClick="document.getElementById('para').innerHTML=Date()">click here to c the time below line</button>

<br>
<br>
<p> In the bellow button it seld display the time by clicking it<br><br>that is button contain time</p>
<button onClick="this.innerHTML=Date()">time is?</button>


<p>here <b>onclick</b> is the event to know more about event
<a href='https://www.w3schools.com/jsref/dom_obj_event.asp'>click here to know about events</a></p>

</body>
</html>

No comments:

Post a Comment