program answers web technology
TRANSCRIPT
-
8/12/2019 program answers WEB TECHNOLOGY
1/4
MUTHAYAMMAL COLLEGE OF ENGINEERING, RASIPURAM. -637408.
ANSWER KEY FOR MODEL EXAM I
Subject Code/Name: IT2353/ WEB TECNOLOGY
Branch: CSE Year & Sem: III/VI
PART-A
Answer all the questions: - (10*2=20)
1) State the use of web server logs and list the contents of a message log.Use of web server logs:
Web server logs record information about server activity. The primary web server logrecording normal activity is an access log, a file that records information about every HTTP
request processed by the server. A web server may also produce one or more message logs
containing a variety of debugging and other information generated by web applications as wellas possibly by the web server itself.
Contents of a message log:
Host name of client machine making the request User name used to log in, if server password protection is enabled Date and time of response, plus the time zone (offset from GMT) of the time Start line of HTTP request (quoted) HTTP status code of response (200 in this example) Number of bytes sent in body of response
2) What is meant by intrinsic event handling? List some intrinsic attributes.Intrinsic Event Handling
In many cases, you won't want the script to run automatically. You might only want the
script to run if the user does something (like hovers over, or clicks a link), or once the page has
finished loading. These actions are called intrinsic events (events for short). There are many
pre-defined intrinsic events that can trigger a script to run. You use event handlers to tell the
browser which event should trigger which script. These are specified as an attribute withinthe HTML tag.Example:
Intrinsic Attributes
-
8/12/2019 program answers WEB TECHNOLOGY
2/4
3) State the function of DNS, TCP/IP, UDP, and SMTP.DNS:
A DNS server is any computer registered to join the Domain Name System. A DNS
server runs special-purpose networking software, features a public IP address, and contains a
database of network names and addresses for other Internet hosts.
TCP/IP:
TCP facilitates the transmission of data from an application to the computer network
using that application. The TCP protocol essentially breaks down data into packets, or groups of
related data, and assembles the data into a usable stream when it reaches its destination.
IP protocol sends and receives data packets over the internet. The IP protocol alsofacilitates communication between networked computers by using algorithms, or mathematical
computations, to determine the most efficient and least congested channel to forward digital
messages.
UDP:
It provides port numbers to help distinguish different user requests and, optionally, a
checksum capability to verify that the data arrived intact.
SMTP:
It used to transfer email messages between two servers across Internet Protocol networks. SMTP verifies whether the person using SMTP server to send email messages has the
right to do so.
SMTP delivers the messages to the specified destination and checks whether themessages are delivered successfully. If the messages arentdelivered successfully,
SMTP notifies the sender through an error message and sends the undelivered message
back to the sender.
4) Define DOM.Document Object Model (DOM), an API (application programming interface) that
defines how JavaScript programs can access and manipulate the HTML document currentlydisplayed by a browser.JavaScript programs access the DOM through a host object nameddocument.JavaScript contains no facilities for interacting with a browser or with thedocument contained in the browser.The definition of the properties of host object, many ofwhich are themselves objects with their own properties, is known as the Document Object
Model (DOM).
5) List the ways of positioning an element within a browser window.Relative positioning
.right { position:relative; right:0.25em }
Float positioning.bigNum { float:left; font-size:xx-large; font-weight:bold }
Absolute positioning
.marginNote { position:absolute; top:0; left:-10em; width:8em; background-color:yellow }
6) List the types of event listeners in DOM2.Mouse, keyboard event listeners
addEventListener()
removeEventListener()
dispatchEvent()
-
8/12/2019 program answers WEB TECHNOLOGY
3/4
7) Write the purpose of java script debuggers.A mistake in a script is referred to as a bug. The process of finding and fixing bugs is
called debuggingand is a normal part of the development process. Debugger is an application
that places all aspects of script execution under the control of the programmer. Debuggers
provide fine-grained control over the state of the script through an interface that allows you
to examine and set values as well as control the flow of execution.
Once a script has been loaded into a debugger, it can be run one line at a time or instructed tohalt at certain breakpoints. Once execution is halted, the programmer can examine the state
of the script and its variables in order to determine if something is amiss.
8) Write a CSS which adds background images and indentation.
Background Images
body { background-image: url(john.jpg);
background-position: bottom right;background-repeat: no-repeat;
background-attachment: fixed; }
p { font-size: 18pt;
color: #aa5588;
text-indent: 1em;
font-family: arial, sans-serif; }
.dark { font-weight: bold; }
When a web server receives a HTTP request from a web browser it evaluates
the request and returns the requested document, if it exists, and then breaks the HTTP
connection. This document is preceded by the response header, which has details about how to
display the document that will be sent by the server. Each time a request is made to the server, it is as
if there was no prior connection and each request can yield only a single document.
This is known as Stateless Connection.
THUS THE ANSWER.
9) Write a java script to generate Random image using array.
Sorting an Array of Images
var images =
[ "dog", "john", "samuel"];
document.write (
-
8/12/2019 program answers WEB TECHNOLOGY
4/4
Refresh the page to view new image10)Write a script that changes background color style property in response to user input.
Background Colors
background color
function changecolor()
{
var clr = document.myform.colorname.value;
document.bgColor = clr;}