Documente Academic
Documente Profesional
Documente Cultură
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 log recording 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 well as 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
Example: <input type="button" value="Click me..." onclick="alert('Thanks, I feel better now!')"> Intrinsic Attributes
4) Define DOM.
Document Object Model (DOM), an API (application programming interface) that defines how JavaScript programs can access and manipulate the HTML document currently displayed by a browser. JavaScript programs access the DOM through a host object named document. JavaScript contains no facilities for interacting with a browser or with the document contained in the browser. The definition of the properties of host object, many of which are themselves objects with their own properties, is known as the Document Object Model (DOM).
8) Write a CSS which adds background images and indentation. <html > <head> <title>Background Images</title> <style type = "text/css"> 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; } </style> </head> <body> <p>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. <span class = "dark">This is known as Stateless Connection. </span> THUS THE ANSWER. </p> </body> </html> 9) Write a java script to generate Random image using array. <html> <head> <title>Sorting an Array of Images</title> <script type = text/javascript> var images = [ "dog", "john", "samuel"]; document.write ( <img src = \" +images[ Math.floor( Math.random() * 3 ) ] +.jpg\width=\"960\" height=\"960\" /> );
</script> </head><body><br>Refresh the page to view new image</body> </html> 10) Write a script that changes background color style property in response to user input. <html> <title> Background Colors </title> <body> <h1> <b> background color </b> </h1> <form name="myform"> <input type="text" name="colorname"> <input type = "button" value = "Change color" onclick = "changecolor()"> </form> </body> <script type = "text/javascript"> function changecolor() { var clr = document.myform.colorname.value; document.bgColor = clr; } </script> </html>