Happy new year Happy new year - 4 years ago 119
jQuery Question

Simple display date not show

My JavaScript not working.
Please give me solution.

<button type="button" on click="getElementById('date').innarHTML=Date()">Click to show Date</button>
<p id="date"></p>

Answer Source

Spelling mistack of innerHTML as innarHTML. To change this correction for run your script.

<button type="button" on click="getElementById('date').innerHTML=Date()">Click to show Date</button>

<p id="date"></p>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download