Professional Documents
Culture Documents
ITCS473 Midterm Sample
ITCS473 Midterm Sample
2) An application that enables a user to login to a remote host and interact with it
(run programs there) as if that host was at his/her desk is called ___________.
a. NFS
b. Telnet
c. SMTP
d. HTTP
8) What is the default port number that a Web browser will access a Web site?
a. 23
b. 25
1
c. 80
d. 110
Question 2: Find and describe the output of the following HTML that is
linked to an internal CSS (6 Marks).
<html><head>
<style type="text/css">
<!--
hr {color: red}
h1 {text-decoration: overline}
h3 {color: green}
p {font-size:11pt; margin-left: 20px}
p.size {letter-spacing: -3px}
body {background-image: url("images/back40.gif")}
span.abc{ background-color: yellow}
-->
</style>
</head>
<body>
<h1>ITCS 373 Mid-Term Exam</h1>
<p>Welcome to <span class="abc"> University of Bahrain </span>
Website.</p>
<p class="size">Computer Science</p>
<hr />
<h3>This is Header</h3>
</body></html>
2
Question 3: Write the necessary HTML tags to represent the page below
(assume any file-name for the picture used below). (15 Marks)
3
Question 4: Write JavaScript statements to do the following
1. Write a statement that define a regular expression that matches all strings that
starts with one digit followed by 3 capital letters followed by one or more dots
characters and ending with 2 digits.
5. Write a statement in the grandchild window to change the value of the first
text field to "test" in the first form in the parent window.
4
Question 5: (14 Marks)
Write a JavaScript function named calculate() which is activated when the user clicks
on a button. The function takes the input from the text field (named myList) in the
following format: n1,n2,n3,n4,n5, …..etc (a list of integer numbers separated by
comma). Your function must display the following in new window:
1. The list size (total numbers in the list)
2. Total of even numbers.
3. Maximum Number.
The function then stores the all the above information in a cookie called result with a
value in the following format: even#max#size.
function calculate(){