Home >Web Front-end >JS Tutorial >Js in bits - nteraction)
Learning js should be fun. It is fun if it's easy.
I tried my best in writing this, to understand it the easy way.
Interaction
There are 3 default interactions provided by js. All 3 of them are modals.
If any of them are triggered, it will stop the interactivity on the rest of the page.
alert
Gives some statement with ok button
prompt
A question with input to add the answer & ok button
An optional parameter can be given, with the question.
input given by user will always be in a string format.
confirm
Some statement with cancel & ok buttons.
ok -> true, cancel -> false
Leave y'r thoughts....
The above is the detailed content of Js in bits - nteraction). For more information, please follow other related articles on the PHP Chinese website!