Exam Example - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Exam Example

Description:

FORM method='post' name='SPORT' action='mailto:egeli_at_boun.edu.tr' TABLE TR TD NAME: ... A HREF='http://www.mis.boun.edu.tr' TARGET='_BLANK' LINK TO MIS ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 20
Provided by: birgl
Category:
Tags: boun | exam | example

less

Transcript and Presenter's Notes

Title: Exam Example


1
Exam Example
2
Question-1
  • Write the code to add the colortext applet into
    HTML code where
  • colortext.class is at class folder
  • text parameter will have value MIS
  • backgroundcolor parameter will have color red
    in numeric value such as (0,0,0)
  • fontsize parameter will be 36

3
Answer-1
  • ltapplet code/class/colortext.classgt
  • ltparam name text value MISgt
  • ltparam name backgroundcolor
    value 255,0,0gt
  • ltparam name fontsize value 36gt
  • lt/appletgt

4
Question-2
  • What would the browser display if the following
    script was executed and the user entered 7 at
    both prompts?
  • ltSCRIPT LANGUAGE "JavaScript"gt
  • var firstNumber window.prompt("Enter an
    integer", 0)
  • var secondNumber window.prompt("Enter an
    integer",0)
  • var thirdNumber
  • thirdNumber firstNumber secondNumber
  • document.write( thirdNumber )
  • lt/SCRIPTgt

5
Answer-2
  • 77

6
Question-3
  • Write the necessary code to write You are not an
    Internet Explorer user if the browser is other
    than Internet Explorer, else it will write
    Thanks for using Internet Explorer.

7
Answer-3
  • ltHTMLgt
  • ltHEADgt
  • ltscript languageJavaScript"gt
  • var an navigator.appName
  • if ( an "Microsoft Internet Explorer" )
  • document.write ("Thanks for using Internet
    Explorer")
  • else
  • document.write ("You are not an Internet
    Explorer user")
  • lt/scriptgt
  • lt/HEADgt
  • ltBODYgtlt/BODYgtlt/HTMLgt

8
Question-4
  • Write the necessary code to print lines for each
    month including this month when the page is
    loaded. If this month is February, the result
    will look like this
  • Month 1 _______
  • Month 2 _______

9
Answer-4
  • ltHTMLgtltHEADgtltscript language"javascript"gt
  • function y()
  • var counter1
  • var mydate new Date()
  • var x mydate.getMonth() 1
  • while (counter lt x1 )
  • document.write ("Month " counter " ")
  • document.write ("____________________ ltbrgt")
  • counter counter 1
  • lt/scriptgt
  • lt/HEADgtltbody onload "y()"gtlt/bodygtlt/HTMLgt

10
Question-5
  • lthtmlgtltheadgtlttitlegtSPORT RESEARCHlt/titlegtlt/headgtltb
    odygt
  • ltFORM method"post" name"SPORT"
    action"mailtoegeli_at_boun.edu.tr"gt
  • ltTABLEgtltTRgtltTDgtNAME
  • ltTDgtltINPUT Type"text" name"Name" size"30"gt
    ltbrgt
  • ltTRgtltTDgtADDRESS
  • ltTDgtltTEXTAREA name"Address" rows3 cols30gt
  • lt/TEXTAREAgtltBRgt
  • lt/TABLEgt
  • ltBRgtYOUR FAVORITE SPORT ltBRgt
  • ltINPUT type"radio" name"FB" value"FB"gt
  • FOOTBALLltBRgt
  • ltINPUT type"radio" name"BB" value"BB" checkedgt
  • BASKETBALLltBRgt
  • ltINPUT type"radio" name"T" value"T"gt TENNISltBRgt

11
Question-5 (Contd)
  • ltBRgtSELECT ALL APPLICABLE FOR YOUR FAVORITE
    SPORT
  • ltSELECT Name"minterest" size"3" multiplegt
  • ltOPTION SELECTEDgt I LIKE PLAYING.
  • ltOPTIONgt I LIKE WATCHING IT ON SITE.
  • ltOPTIONgt I LIKE WATCHING IT ON TV.
  • lt/SELECTgt
  • ltBRgtltBRgt
  • ltINPUT TYPE"image" src"logo.jpg"gt
  • ltINPUT TYPE"reset" value"RESET"gt
  • lt/BODYgtlt/HTMLgt

12
Answer-5
13
Question-6
Write the code for the below page view. Top frame
height is 70 and left frame width is 220 pixels
14
Answer-6 Frame Page
  • ltHTMLgtltHEADgt
  • ltTITLEgtFramelt/TITLEgt
  • lt/HEADgt
  • ltframeset rows70,gt
  • ltframe name"top" src"top.htm"gt
  • ltframeset cols220,gt
  • ltframe name"left" src"left.htm"gt
  • ltframe name"right" src"right.htm"gt
  • lt/framesetgt
  • lt/framesetgt
  • ltBODYgtlt/BODYgt
  • lt/HTMLgt

15
Answer-6 Top Page
  • ltHTMLgtltHEADgtlt/HEADgt
  • ltBODY textbluegt
  • ltPgt
  • (THIS IS "TOP.HTM" ON FRAME "TOP",nbsp
  • TEXT COLORBLUE,nbsp IMAGELOGO.JPG)
  • lt/Pgt
  • ltPgt
  • ltIMG src"logo.jpg" aligncenter gt
  • BOGAZIÇI UNIVERSITY
  • lt/Pgt
  • lt/BODYgtlt/HTMLgt

16
Answer-6 Left Page
  • ltHTMLgtltHEADgtlt/HEADgtltBODYgt
  • THIS IS "LEFT.HTM" ltBRgtON FRAME "LEFT".
  • ltULgtltLIgt
  • ltA HREF"http//www.mis.boun.edu.tr"
    TARGET"_BLANK"gt
  • LINK TO MIS DEPARTMENT,
  • WILL DISPLAY ON A NEW WINDOW lt/Agt
  • ltLIgt
  • ltA HREF"REG.HTM" TARGET"RIGHT"gt
  • LINK TO REGULATIONS PAGE REG.HTM,
  • WILL DISPLAY AT "RIGHT" FRAMElt/Agt
  • ltLIgt
  • ltA HREF"MAILTOBOUN_at_BOUN.EDU.TR"gt
  • LINK TO BOUN_at_BOUN.EDU.TR lt/Agt
  • lt/ULgt
  • lt/BODYgtlt/HTMLgt

17
Answer-6 Right Page
  • ltHTMLgt
  • ltHEADgt
  • lt/HEADgt
  • ltBODYgt
  • THIS IS "RIGHT.HTM" ON FRAME "RIGHT".
  • lt/BODYgt
  • lt/HTMLgt

18
Question-7
  • Write the script code for displaying an alert box
    having text You are leaving with the location
    of the page while leaving the page.

19
Answer-7
  • ltHTMLgtltHEADgt
  • ltSCRIPT languageJavaScriptgt
  • var urldocument.location
  • function x()
  • alert(You are leaving url)
  • lt/HEADgt
  • ltBODY onUnloadx()gt
  • lt/BODYgt
  • lt/HTMLgt
Write a Comment
User Comments (0)
About PowerShow.com