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 from this blog

Installing ns3 in Ubuntu 22.04 | Complete Instructions

How to Create Ubuntu 24.04 Bootable USB Using Rufus [Step-by-Step Guide]

Installation of NS2 in Ubuntu 22.04 | NS2 Tutorial 2