[go: up one dir, main page]

0% found this document useful (0 votes)
4 views4 pages

Practical 4

Uploaded by

Xenon Y
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

Practical 4

Uploaded by

Xenon Y
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Practical 4

<!DOCTYPE html>
<html>
<head>
<title>Document</title>
</head>
<body>
<script>
function myfun()
{
document.write("Hello This is Function");
}
</script>
<p> Click the following button to call a function </p>
<from>
<input type="button" onclick="myfun()" value="Call Function">
</from>
</body>
</html>

<!DOCTYPE html>
<html>
<head>
<title>Document</title>
<script>
function A()
{
B();
}
function B()
{
alert("Inside the function B() via function A()");
}
</script>
</head>
<body onload="A()">
</body>
</html>

<!DOCTYPE html>
<html>
<head>
<title>Document</title>
<script>
function Hello()
{
alert("Hello !!");
}
function goodBye()
{
alert("Goodbye !!!");
}
</script>
</head>
<body onload="Hello()" onunload="goodBye()">
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Document</title>
<script>
function myFun(name,age)
{
document.write("My Name is "+name+" and I am "+age+" years old");
}
</script>
</head>
<body>
<p>Click the following button to call the function</p>
<form>
<input type="button" onclick="myFun('Siddhi',19)" value="Click Me !!">
</form>
</body>
</html>

You might also like