Here first create JavaScript file and link it in HTML file.
JavaScript file js.js
function piyu()
{
alert("Hello Friends");
}
HTML file
<html>
<head>
<script type="text/javascript" src="js.js"></script>
</head>
<body>
<p>Welcome to javascripttution.blogspot.com</p>
<form>
<input type="button" value="click" onclick="piyu()"/>
</form>
</body>
</html>
JavaScript file js.js
function piyu()
{
alert("Hello Friends");
}
HTML file
<html>
<head>
<script type="text/javascript" src="js.js"></script>
</head>
<body>
<p>Welcome to javascripttution.blogspot.com</p>
<form>
<input type="button" value="click" onclick="piyu()"/>
</form>
</body>
</html>
No comments:
Post a Comment