Ut 1
Ut 1
QUESTION BANK
Unit Test-I (Shift:-I & II)
Program : - Computer Engineering Group Program Code:- CM/IF
Course Title: -Client Side Scripting Language Semester: - Fifth
Course Abbr &Code:-CSS (22519) Scheme:
I --
------------------------------------------------------------------------------------------------
2 MARKS
.
2. Compare client-side and server-side scripting.
<title>Document</title>
</head>
<body>
<script>
var num = 1;
while (num <= 10)
{
var sq = num * num;
document.write("The square of "+num+" is "+sq+ "<br>");
num++;
}
</script>
</body>
</html>
document.write("reverse:"+a.reverse());
</script>
</body>
</html>
PUSH()
PUSH() method is used to add a new element at the end of an array
It is changes the length of the array
The syntax is
arrayObject.push(“shiv”)
4. Define string? How to declare it?
String Represents a sequence of characters used for textual data.
Strings are enclosed in single quotes (`'`), double quotes (`"`), or
backticks (`` ` ``) for template literals.
String is an object that is used for storing and manipulating data
- Examples of declaring a string
var name = "Alice";
var greeting = 'Hello, world!';
var templateLiteral = `Hello, ${name}`;
4 MARKS
Describe the term intrinsic functions in detail.
2. How to evaluate checkbox selections? Describe with
example..
3. Design a HTML form for filling the information for
registration of a student.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>form</title>
<link rel="stylesheet" href="./user.css">
</head>
<body>
<h1>html forms</h1>
<hr>
<br>
<form action="#"method="get">
First Name<input type="text" name="fname" id="fname" required>
<br>
Contact <input type="tel" name="contact" id="contact">
<br>
Number <input type="number" name="favnum" id="favnum">
Enter email <input type="email" name="email" id="email">
<br>
<br>
<input type="checkbox" name="female" id="female"
value="FEMALE">
<input type="checkbox" name="male” id="male"
value="MALE">
</form>
</body>
</html>
4. How to change labels dynamically? Explain with
example.
5. With the help of example describe how to change
option list dynamically.