Alert, Confirm and Prompt in Javascript

 

<html>
<script type=text/javascript>
function alertFn()
{
alert("Welcome to my Website");
}
function confirmFn()
{
confirm("Please Select yes or no");
}

function promptFn()
{
prompt("Enter your Name", "Pradeepkumar");
}

</script>
<body onload="alertFn()">
<input type=button Value="Click" onclick="confirmFn()">
<input type=button value="Click Me" onclick="promptFn()">
</body>
</html>

Comments

Popular Posts