In this blog we will see how to make an alert/warning message button in html, you can do so by following the steps given below.
Step 1: Go to notepad and type the given codes below.
<html>
<head>
<script language="javascript" type="text/javascript">
function warn()
{
alert("This is a alert/warning message");
}
</script>
</head>
<body>
<p>click the button to see the result</p>
<input type="button" value="click me" onclick ="warn();"/>
</body>
</html>
Step 2:Save the file in .html extension and run.
Step 1: Go to notepad and type the given codes below.
<html>
<head>
<script language="javascript" type="text/javascript">
function warn()
{
alert("This is a alert/warning message");
}
</script>
</head>
<body>
<p>click the button to see the result</p>
<input type="button" value="click me" onclick ="warn();"/>
</body>
</html>
Step 2:Save the file in .html extension and run.
0 comments:
Post a Comment