Grammar:
onclick= "Somejavascriptcode"
The OnClick event occurs when the object is clicked.
Please note that the onclick is different from onmousedown.
Click event occurs when a mouse-down event occurs after a mouse-down event occurs on the same element.
HTML tags that support the event:
<a>, <address>, <area>, <b>, <bdo>, <big>, <blockquote>, <body>, < Button>,
<caption>, <cite>, <code>, <dd>, <dfn>, <div>, <dl>, <dt>, <em>, <fieldset>,
<form>, <li>, <map>, <object>, <ol>, <p>, <pre>, <samp>, <select>, <small , <span>,
<strong>, <sub>, <sup>, <table>, <tbody>, <td>, <textarea>, <tfoot>, <th>,
<thead>, <tr>, <tt>, <ul>, <var>
JavaScript objects that support the event:
button, document, CheckBox, link, radio, reset, submit
Cases:
Click the button to copy the text from the first input box to the second input box:
<span style= "FONT-SIZE:18PX;" >
HTML Dom Event Object onclick Event