+ 2

I'm trying to make a game using HTML, CSS and Java

I inserted <bottom id="start" onclick=start( )>START</bottom> but when I try to open the game it says that start is not a function. what must I do?

6th Dec 2016, 2:34 PM
Edwin Pratt
Edwin Pratt - avatar
4 Answers
+ 4
Go through this checklist: Are you using JavaScript? Did you link the script? Can the JavaScript run separately? (If so, it's an HTML problem; otherwise, it's a JavaScript problem) Is your syntax good?
6th Dec 2016, 2:36 PM
Keto Z
Keto Z - avatar
+ 3
tell me, if I wrote something in HTML, must I also write something in CSS and Java?
7th Dec 2016, 5:51 AM
Edwin Pratt
Edwin Pratt - avatar
+ 2
yes if it says start is not a function there is error in making of function start() function start(){ you can also make by this } check for this on your code
6th Dec 2016, 7:01 PM
Sandeep Chatterjee
+ 1
and do you have a function named start() in your JS code? The name id="start " in tag is only an identificator of button, nothing for running.
6th Dec 2016, 4:51 PM
Petr Hatina
Petr Hatina - avatar