html onclick can 27t find function

Solutions on MaxInterview for html onclick can 27t find function by the best coders in the world

showing results for - "html onclick can 27t find function"
Christopher
13 Jan 2017
1<!--
2	Your script is most likely after your HTML.
3	Include it before html, so that your function is defined.
4
5	Another reason your function may be undefined is beacuse there is 
6	some kind of error blocking your function from exectuing!
7-->
8
9<script>
10	function BtnPress() {
11		console.log("I work because i am defined before my caller!");
12    }
13</script>
14
15<button onclick="BtnPress()">Press Me!</button>