How to confirm or prompt user for input via JavaScript


JavaScript has a built-in function called confirm which takes a string argument that poses the question to the user and gives them the option to click the OK or Cancel buttons and returns true if the user clicks OK.

Demo
green box

yellow box


Continue reading How to confirm or prompt user for input via JavaScript