Top Comments
All Comments (57)
-
@pepparn123 it can be anywhere. It's actually easier to just put < button instead of < input
-
@Kyuunul when working with booleans, an easier way is to simply write "if (confirm)" and "if (!confirm)". The former checks if the boolean exists and/or is defined positively. The latter checks if the boolean doesn't exist (undefined/null) or is defined negatively
-
this guys tutorials are the best and he's friggin hillarious
-
"...make sure its inside your body and not your head"
-
@LordShiding You gotta use an if :D
like so
var confirm=confirm("Are you sure you want to procceed ?");
if(confirm==true){
alert("You pressed yes/ok")
}
else{
alert("Your pressed no/cancel")
}
}
-
before the onClick and it will work
-
but how do you get text on a button? like on an alarm box, like yes or no options?
-
You are a GOD!!!
-
It is normally better to call a predefined function from the event listener, especially if it calls more than one line.
-
dude, ur tutorials are OUTSTANDING !!!!!!!
if you dont learn basics youll kill yourself trying to learn the advanced stuff
letmekilluplz 3 years ago 23
If you put value="I'm a button" after the onclick the button will have a name.
pepparn123 2 years ago 17