What is Code of onclick button function | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is Code of onclick button function

22nd Oct 2018, 2:37 AM
Muhammad Adeel
Muhammad Adeel - avatar
4 Answers
+ 6
<button onclick="clickEvent()">Click this button ...</button> <script> function clickEvent(e) { alert('Hi! thanks for clicking the button.'); } Paste this on HTML document body, you can add more code inside clickEvent function by yourself to play around with it, if it was not what you're looking for, then you may need to explain better your question.
22nd Oct 2018, 2:56 AM
Ipang
+ 1
Thanks a lot
22nd Oct 2018, 8:35 AM
Muhammad Adeel
Muhammad Adeel - avatar
0
You're welcome my friend, keep on learning : )
22nd Oct 2018, 1:27 PM
Ipang
0
You're welcome my friend, keep on learning : )
22nd Oct 2018, 1:27 PM
Ipang