Han
0
Q:

html onclick can't find function

<!--
	Your script is most likely after your HTML.
	Include it before html, so that your function is defined.

	Another reason your function may be undefined is beacuse there is 
	some kind of error blocking your function from exectuing!
-->

<script>
	function BtnPress() {
		console.log("I work because i am defined before my caller!");
    }
</script>

<button onclick="BtnPress()">Press Me!</button>
0

New to Communities?

Join the community