HTML?? ? ???? ???? ???? ???? ?? ??? ?? ???? ??(???)? ???? ??? ????. ?? ??? ??? ?? onclick ??? ???? ?? ?????? ???? ?? ?????? ? ??? ??? ??? ??? ???? ??? ??? ???????. ???? ?>? ???? ???? ?????. ??? ?????
onclick ?? ??
?? ???? ??? ???? ? ??? ??? ????? ???? ? ?????. ????
??:
<button? name="" value="" onclick<strong> ="</strong>function()"/>
? ??? html ???? onclick ???? ?? ??????. ?? ??? ?? ??? ?? ??? ??? ???? ???????.
HTML onclick ??? ?
??? html? onclick ?? ????.
?? #1
??:
<html>
<body>
<button onclick="Function()">Click</button>
<p id="sample"></p>
<script>
function Function() {
document.getElementById("sample").innerHTML = "Welcome";
}
</script>
</body>
</html>
??:

?? ???? javascript ??? ??????. ?? ???? "??" ??? ???? ???? ??? "?????"?? ?? ?????.
?? #2
??:
<html>
<body>
<p id="sample" onclick="Function()">Click</p>
<script>
function Function() {
document.getElementById("sample").innerHTML = "Welcome";
}
</script>
</body>
</html>
??:

? ??? ?? ?? 1?? ??? ?? ????? ???? ?>? ???? ????. ?? ??
??(??) ?????. ??? ?? ?? ?????.
?? #3
??:
<html>
<body>
Username: <input type="text" id="user" value="sivaraman" ><br>
Password: <input type="text" id="pass"><br><br>
<button onclick="Function()">Click</button>
<script>
function Function() {
document.getElementById("pass").value = document.getElementById("user").value;
}
</script>
</body>
</html>
???:

?? ???? ??? ???? ????? ?? ???? '??' ??? ??? ? ??? ???? ????? ?? ???? JavaScript ??? ??????. onclick ???? ?? ?? ? ?????.
??? ??? ? OnClick ???
- ?? ??? ???? ?? ?? ?? ????? ???? onclick ?? ??? HTML ???? ?? ???? ???? ? ???? ??? ??? ??? ??? ??? ???? ? ????? ???. ??? ?? ? ?? ???? ??? ??? ??? ?? ? ??? ? ???? ???? ??? ?? ?????.
- ?? ????? ? ?? ??? ??? ????. "key-down" ???? ??? ??? ???? ?? ???? ??? ???? ?? ???? ???? ?? ???? ??? ??? ??? ? ????. onclick ???? ?? ?????? ?? ??? ????.
- ??? MouseEvent ??? ??? ??? ?? ?? ? ??? ???? ???? ????? ???. ? ?? ??? ??? ?? ??? ?? ??? ???? ?????. EventTarget.addEventListener() ???? ???? ? ??????.
?? ?? ?? ? ??? ?? ??? ????? ??
<html>
<body>
<div id="example">Click</div>
<script>
document.getElementById('example').onclick = function changeContent() {
document.getElementById('example').innerHTML = "Welcome to my domain";
document.getElementById('example').style = "Color: green";
}
</script>
</body>
</html>
??:

- ? ???? ??? ??? ??? ??? ???? ?? ?? ???? ??????. ?? ??? ??? ??? ????? ??? ??? ? ??? ?? ??? ??? ? ????.
- Onclick ???? ?? ??? ?????. ?? ???? ???? ?? ??? ??? ? ???? ???? ???? ????. onclick ???? ?? ???? ???? ?? ??? ?????? ?? ? ?? ?? ??? ?????. ????? ???? ???? ??? ??? ???? ???? onclick ??? ??? ???? html ?? ??? ????? ???? ???? onclick? onClick?? ????? ????? ??? ???? ?????.
- ?? ??? ?? ?? ????? ?? ??? ???? ? ???? ????? ????? ??? ???? ??? ?? ??? ???? ?? ??? ??? ? ????. ?? ????? ?? ?????. onclick ???? ?????? ??? ???? ???? ?? ??? ????. ?, onclick ????? ??? ??? ??? html ???? ???????. ???? ???? ?? onclick() ??? ??? ?? ?? ??? ??? ???. ??? ???? ??? ??? ?????? ???? ????? ????.
html ???? onclick ???? ???? ? ??? ?? ? ?? ?? ??? ??? ????.
1. onclick=”javascript:function()”? ???? ?? href ?????:
? ?? ?? ??? javascript: like ???? ?????.
2. onclick=" function()" ? onclick=" function();"? ?? ?????? ??? ????. ? ? ? ????? ?? ?? ????? ???? ?? ?? ??? ????.
3. onclick, onCLICK ? ONCLICK? ?? ??? ??? ?? ????? ????? document.getElementById().onclick=”? ?? ??? ? ???? ?? ??? ???? javascript ??? ????? ?????. ??? ?? ??? ??? ???. ??????.
??
onclick? ?????? ??? ??? ?????? ???. ??? ?? ? ? ??? ??? ??? ? ? ????. jquery??? onclick ??? ??? ??? ?? ?? ??? ?? ???? ?????. React js? ????? angle? onclick ???? ???? ?? ????????. ?? Google Chrome, Mozilla Firefox, Safari ?? ?? ?? ???? ???? ?????. ????????? onclick ??? ??? ??? ? ?? ?? ??? "?? ?, ?? ?, ?? ?"? ?? ?? ???? ??? ? ????. ontoggle,onkeyup “?.. ??? ?? ??? ?? html?? ??? ??? ??? ? ????.
? ??? HTML ??? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!