+ 2
What happens if we use both prompt and alert boxes at a time?
I just want to know about the question and please help me.
4 Antworten
+ 9
Code stops and awaits input, then continues……
+ 3
you'll have both windows that will open in the order written in your code
+ 2
What better way than to try it out yourself. You know, you can test JavaScript right in your browser. :P
+ 2
Nothing will happens, as alert/prompt/confirm dialog are modals ones, what mean that when called, script is stopped, waiting for the returned value of the function, which occurs only when the dialog is closed by user. ALL the active script is stopped: you cannot guess that sending some setInterval or setTimeout will success to call a second dialog box, but it will never occurs ( all the js script(s) of a page is running in one unique thread ) ...