Professional Documents
Culture Documents
Goldengate International College: WEB Technology
Goldengate International College: WEB Technology
Goldengate International College: WEB Technology
Battisputali,Kathmandu
Lab Report
WEB
TECHNOLOGY
c. <!DOCTYPE html>
d. <html lang="en">
e. <head>
f. <meta charset <meta http-equiv="X-UA-Compatible" content="IE=edge">
g. <meta name="viewport" content="width=device-width, initial-scale=1.0">
h. <title>Document</title>
i. <script>
j. function enlarge(id)
k. {
l. var img=document.getElementsByTagName('img')[id];
m. img.height=500;
n. }
o. function resize(id)
p. {
q. var img=document.getElementsByTagName('img')[id];
r. img.height=250;
s. }
t.
u. </script>
v. </head>
w. <body>
x. <img src="a.jpg" height="100px",onmouseover="enlarge(0)"
onmouseout="resize(0)">
y.
z. </body>
aa.<
Output:
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var s="Golden Gate Int'l College";
document.write ("Length:"+s.length+"<br>");
document.write("Upper case:"+s.toUpperCase()+"<br>");
document.write("Lower case:"+s.toLowerCase()+"<br>");
document.write("Character at 9:"+s.charAt(9)+"<br>");
document.write("Character Code at 14:"+s.charCodeAt(14)+"<br>");
</script>
</body>
</html>
Output:
</script>
</body>
</html>
Output:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var d= new Date(“1980/12/11”);
document.write("month="+d.getMonth()+"<br>");
</script>
</body>
</html>
Output:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var a=new Object();
a.name="Namrata";
a.address="Chhauni";
a.show=function()
{
document.write("Name="+this.name+"<br>")
document.write("Address="+this.address+"<br>")
}
a.show();
</script>
</body>
</html>
Output:
if(name.value=="")
{
alert("Name is Required");
}
if(pwd.value=="")
{
alert("Password is Required");
}
if(name.value=="")
{
alert("emailis Required");
}
}
</script>
<body>
<form onsubmit"check"()>
Name:<input type="text" name=""id=name"><br>
Password:<input type="text" Password=""id=name"><br>
email:<input type="text" email=""id=name"><br>
<input type="submit" value ="validate">
</form>
</body>
</form>
</html>
Output: