This document provides an exam specification and lesson content for a web review exam covering JavaScript, jQuery, and Ajax. The exam includes multiple choice, fill-in-the-blank, and coding exercise questions. Lesson 1 covers JavaScript windows, screen, location, and popup boxes. Lesson 2 introduces jQuery and covers selectors, effects, animations, content manipulation, and element addition/removal. Lesson 3 explains AJAX and the XMLHttpRequest object. Sample questions and exercises are provided to demonstrate question types.
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Web review
1. Web Review
Exam Specification
- Covers:Javascript,jQuery,andAjax
- MCQs : 20 items
- Fillingthe gaps: : 5 items
- Questions : 5 items
- Exercise : 2 items
Lesson1: JavaScript
I. JavaScriptWindow
1. What isJavaScriptWindow?Whywe use JavaScriptWindow?
2. How manymethodsof JavaScriptWindow?Whatare they?
There are 4:
- window.open() - openanew window
- window.close() - close the currentwindow
- window.moveTo() -move the currentwindow
- window.resizeTo() -resizethe currentwindow
Reference:http://www.w3schools.com/js/js_window.asp &Textbook(page 103 & 104)
II. JavaScriptWindowScreen
1. Compare twopairsof itsproperties?
screen.width [screenonusersaw]
screen.height
VS
screen.availWidth [screen+nav(browser)]
screen.availHeight
Reference:http://www.w3schools.com/js/js_window_screen.asp &Textbook
III. JavaScriptWindowLocation
1. What isJavaScriptWindowLocation?WhenandWhy we use it?
The window.locationobjectcanbe usedto get the currentpage address(URL) and to
redirectthe browsertoa new page.
2. How manymethodsof window.location?
There are 6 methods:
- window.location.href returnsthe href (URL) of the currentpage
- window.location.hostnamereturnsthe domainname of the webhost
- window.location.pathnamereturnsthe pathandfilename of the currentpage
- window.location.protocol returnsthe webprotocol used(http://orhttps://)
- window.location.assignloadsanew document
2. - window.location.portreturnsthe portof the webhost(80 or 443)
3. To loada new document,whichmethod isused?
window.location.assign
Reference:http://www.w3schools.com/js/js_window_location.asp &Textbook
IV. JavaScriptPopupBoxes
1. How manypopupboxesinJavaScript?
There are 3:
- Alert Box: Analertbox is oftenusedif youwantto make sure information
comesthroughto the user.When analertbox popsup, the userwill have toclick
"OK"to proceed.
- ConfirmBox: A confirmbox isoftenusedif youwant the userto verifyoraccept
something. Whenaconfirmbox popsup,the userwill have toclickeither"OK"
or "Cancel"to proceed. If the userclicks"OK",the box returnstrue.If the user
clicks"Cancel",the box returnsfalse.
- Prompt Box: A confirmbox isoftenusedif youwant the userto verifyoraccept
something.Whenaconfirmbox popsup,the userwill have toclickeither"OK"
or "Cancel"to proceed.If the userclicks"OK",the box returnstrue.If the user
clicks"Cancel",the box returnsfalse.
Reference:http://www.w3schools.com/js/js_popup.asp &Textbook
V. JavaScriptTimingEvents
1. What isJavaScriptTimingEvents?
2. What are the twokeymethods? How Syntax & Parameterslooklike?
a. setTimeout(function, milliseconds)
Executes a function, after waiting a specified number of milliseconds.
b. setInterval(function, milliseconds)
Same as setTimeout(), but repeats the execution of the function continuously.
3. How to stopthe executionof JavaScriptTimingEvents?(Please note:we cannotuse stop()
methodsonthiscontext)
There are twomethods
- window.clearTimeout(timeoutVariable):stopsthe executionof the function
specifiedinsetTimeout().
- window.clearInterval(timerVariable):stopsthe executionsof the function
specifiedinthe setInterval() method.
Reference:http://www.w3schools.com/js/js_timing.asp &Textbook
Lesson2: jQuery
1. What isjQuery?WhyjQuery?
2. How to use jQuery?
DownloadfromjQuery.com
3. ImportCDN
3. Why dowe use $(document).ready?
4. How manyjQueryselector?
There are 4:
- Tag name
- Class
- Id
- Currentelement(orcalled“this”)
5. What are differencesbetween(Hide/Show) and(Fade in/Fade out)?
6. Why dowe use toggle?
7. How manyparametersof toggle?
There are 2 : speed&callback
8. How manyFadingmethods?
There are 4:
- fadeIn()
- fadeOut()
- fadeToggle()
- fadeTo()
9. Please describeparameterof Fadingmethods?
OnlyfadeTo() contains3parameters: $(selector).fadeTo(speed, opacity,callback)
10. What isanimation?Whydo we use animation?
11. Please describeitsparameter? $(selector).animate({param},speed,callback)Whichparameters
are requiredandwhichare optional?
12. We are supposedtoanswerthe resultof animationcoding.
For example,left=200 & opacity= 0.5. Please choose the rightanswerasbelow.Thingslike that
13. What isjQuerystop() method?
It isusedto stop animationsoreffectsbefore itisfinished.
14. How manyjQuerystopmethods?
There are 3:
- stop():stopscurrentanimation
- stop(true):stopall animation
- stop(true,true):stopsall animationbutfinishthe currentanimation
15. How manyjQueryGetcontentmethods?
There are 3:
- text()
- html()
- val()
16. What methodtoget or setattribute?
attr()
17. How manyjQuerySetcontentmethods?
There are 3:
- text()
- html()
- val()
4. 18. How manymethodsusedto add elements?
There are 4:
- append() - Insertscontentatthe endof the selected elements
- prepend() - Insertscontentatthe beginningof the selectedelements
- after() - Insertscontentafterthe selectedelements
- before() - Insertscontentbeforethe selectedelements
19. How to remove elementandcontentinjQuery?
There are twomethods
- remove() - Removesthe selectedelement(anditschildelements)
- empty() - Removesthe childelementsfromthe selectedelement
20. CSS syntax?(Pleasefocusonlyoncssmethod() andproperty())
21. Please explainDimensionmethods(Oneof themwill be appearedinexam)
- width() [nopadding,border,margin]
- height()
- innerWidth()[padding]
- innerHeight()
- outerWidth()[border,margin]
- outerHeight()
22. Traversingwill be appearedinexercisepartonly.
23. What isAncestor?Howmany methodsare there?(father)
There are 3:
- parent() [selectparent ]
- parents() [selectall parents]
- parentsUntil()[selectbetween]
24. What isFiltering?There are 3 methods:
The three most basicfilteringmethodsare first(),last()andeq(),whichallow youtoselecta
specificelementbasedonitspositioninagroupof elements.
Otherfilteringmethods,like filter() andnot() allow youtoselectelementsthatmatch,or do not
match, a certaincriteria.
Lesson3: Ajax
1. What isAJAX? Is update partof webpage withoutreloadingpage.
AJAX= AsynchronousJavaScriptXML.
Create fastand dynamicwebpage.
2. How manystepsto accessAJAX? (There are 6 steps)
- Browsercreatesan XMLHttpRequestobject
- BrowsersendsHttpRequesttoserver
- Serverreceive andthenprocessHTTPRequest
- Servercreatesa response andsendsdataback to the browser
- Browserreceivesandprocessesthe returneddatausingJavaScript
5. - Browserupdatespage content
Please notice:To access AJAX, Internetis needed.
3. AJAXXMLHttp Create Object – How to create object? (Pleaselookatpage 68)
4. AJAXXMLHttp Response –There are twoproperties(Please lookatpage 77)
5. AJAXXMLHttp readyState – There are three properties(Pleaselookatpage
79)(onreadystatechange(functioncall whenreadystate propertieschange),readyState(0,not
initialized,1,establishconnection,2, requestreceive ,3,processrequest, 4 requestfinishand
response already),status(200= page notfound))
6. AJAXXMLHttp readyState istriggeredeverytimethe readState changes.
7. Please rememberthe descriptionof propertyvalueof readyState &status
For example,0:requestnotinitialized(readyStateproperty)
200: “OK”
404: Page notfound
500: Servererror
Please goback topage 49 of textbook
8. What isjQueryLoad? Howto use it? Please write its syntax?(Page49)
9. Compare GET vsPOST method?(Pleaselookatpage 52 – the bulletparts)
For example,GETrequestscanbe cached.Thingslike that
10. What isjQuerynoConflict()?Please pay muchattentionwithitsSyntax?
11. jQueryReferences –Please lookatthe methodsthatwe have learntandfrequentlyused(If you
can rememberall of them,youare verycool. Actually,we are not supposedto memorize all of
them)
Exercises:There are two:
1. The big one:
- Write jQueryof exercise thatwe didin JavaScript(Node Creation):Pleasego
throughthe homeworkof JavaScriptfromnode creationuntil the end.
- jQueryHomeworkthatcontains3 exercises(Slide,image_slide,image_flow)
2. Teachersaidthat “The lastone is supposedtobe small andeasiest”
- Traversing(We mustknow how to use itsmethodsproperly)
- Ancestor
- Descendants