There is only one parameter window.confirm. Display information in the prompt box. Press OK to return true; press Cancel to return false.
<script>
var bln = window.confirm("Are you sure?");
alert(bln)
</script>
There is only one window.alert parameter, which displays the warning box information; no return value.
<script>
window.alert("OK.")
</script>
There are two window.prompt parameters. The first parameter displays the information of the prompt input box. The second parameter is used to display the default value of the input box. Returns the value entered by the user.
<script>
var str = window.prompt("Please enter password", "password")
alert(str);
</script>