+ 1
How do i get an onclick event to work on an Android tablet
I am trying to get an onclick event to work but on a tablet in sololearn does not work.
7 Respostas
+ 9
Show your code so that we can help
+ 9
To make button work you have to define function
Ex-
<button onclick="hello()">click me</button>
<script>
function hello(){
alert("please define function")
}
</script>
+ 2
Hi Graeme Adamson, you forgot to put parenthesis there, in the button tag attribute, instead of "prsbtn1", you need to use "prsbtn1() "
+ 1
Thanks got it sorted. I will try to be more careful.
+ 1
Got it sorted it a beginners error. Thanks