Q1. Write a JavaScript function that accept three numbers and display the larger number
<head>
<script>
function largest()
{
var num1, num2, num3;
num1 =
Number(document.getElementById("N1").value);
num2 =
Number(document.getElementById("M1").value);
num3 = Number(document.getElementById("O1").value);
if(num1>num2
&& num1>num3)
{
window.alert(num1+"-is
greatest");
}
else if(num2>num1
&& num2>num3)
{
window.alert(num2+"-is
greatst");
}
else if(num3>num1
&& num3>num1)
{
window.alert(num3+"is
greatest");
}
}
</script>
</head>
<body>
<br><br>
Enter number 1:
<input type="text"
id="N1"></input><br><br>
Enter number 2:
<input type="text"
id="M1"></input><br><br>
Enter number 3:
<input type="text"
id="O1"></input><br><br>
<button
onclick="largest()">OK</button>
</body>
</html>
Q2. Create HTML page with following specifications
i) Title
should be about your City.
ii) Color
the background by Pink color.
iii) Place
your city name at the top of page in large text and in blue color.
iv) Add
names of the landmarks in your city, each in different color, style and font
v) Add
scrolling text about your City.
vi) Add
any image at the bottom.
(Use Internal CSS to
format the web page)
Refer
slip 4,8,12,15,20
<head>
<style>
body { background-color: linen;
}
</style>
</head>
<body>