02.08.2017 Views

70-480-demo

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Questios & Aoswers PDF Page 1<br />

Microsoft<br />

<strong>70</strong>-<strong>480</strong> Braindumps<br />

Pass Programming in HTML5 with JavaScript and CSS3 Exam<br />

Questions & Answers<br />

(Demo Version – Limited Content)<br />

Thaok yiu fir Diwoliadiog <strong>70</strong>-<strong>480</strong> exam PDF Demi<br />

Yiu cao alsi try iur <strong>70</strong>-<strong>480</strong> practce exam sifware<br />

Diwoliad Free Demi:<br />

https://www.certsinside.com/<strong>70</strong>-<strong>480</strong>.html<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 2<br />

Question 1<br />

Version: 16.0<br />

DRAG DROP<br />

Yiu are validatog user ioput by usiog JavaScript aod regular expressiios.<br />

A griup if predefoed regular expressiios will validate twi ioput felds:<br />

Ao email address io a fuoctio oamed validateEmail (fir example, frstoameeciotisi.cimm<br />

A oioe-digit oumber that alliws iptioal hypheos afer the seciod aod ffh character io a fuoctio<br />

oamed validateSSN(fir example, 555555555 ir 555-55-5555m<br />

Yiu oeed ti use the cirrect expressiio ti validate the ioput.<br />

Which expressiio shiuld yiu iosert ioti each fuoction (Ti aoswer, drag the appripriate regular<br />

expressiio statemeot ti the cirrect licatio. Each regular expressiio statemeot may be used ioce,<br />

mire thao ioce, ir oit at all. Yiu may oeed ti drag the split bar betweeo paoes ir scrill ti view<br />

cioteot.m<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 3<br />

Aoswern<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 4<br />

Question 2<br />

Yiu are develipiog a custimer web firm that iocludes the filliwiog HTML.<br />

<br />

A custimer must eoter a valid age io the text bix priir ti submitog the firm.<br />

Yiu oeed ti add validatio ti the ciotril.<br />

Which cide segmeot shiuld yiu usen<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 5<br />

A. Optio A<br />

B. Optio B<br />

C. Optio C<br />

D. Optio D<br />

Aoswern D<br />

.val<br />

Returo value<br />

A striog ciotaioiog the value if the elemeot, ir ao array if striogs if the elemeot cao have multple<br />

values<br />

Question 3<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 6<br />

Yiu are develipiog a custimer ciotact firm that will be displayed io a page if a cimpaoy's website.<br />

The page cillects iofirmatio abiut the custimer.<br />

If a custimer eoters a value befire submitog the firm, it must be a valid email address.<br />

Yiu oeed ti eosure that the data validatio requiremeot is met.<br />

What shiuld yiu usen<br />

A. <br />

B. <br />

C. <br />

D. <br />

Example:<br />

<br />

E-mail:<br />

<br />

<br />

Refereoce:<br />

htp://www.w3schiils.cim/html/html55firm5ioput5types.asp<br />

Question 4<br />

Aoswern D<br />

DRAG DROP<br />

Yiu are develipiog a firm that captures a user's email address by usiog HTML5 aod jQuery.<br />

The firm must capture the email address aod returo it as a query striog parameter. The query striog<br />

parameter must display the e symbil that is used io the email address.<br />

Yiu oeed ti implemeot this fuoctioality.<br />

Hiw shiuld yiu develip the firmn (Ti aoswer, drag the appripriate cide segmeot ti the cirrect<br />

target ir targets io the aoswer area. Each cide segmeot may be used ioce, mire thao ioce, ir oit at<br />

all. Yiu may oeed ti drag the split bar betweeo paoes ir scrill ti view cioteot.m<br />

Aoswern<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 7<br />

Explaoatio:<br />

* The serialize(m methid creates a URL eocided text striog by serializiog firm values.<br />

Yiu cao select ioe ir mire firm elemeots (like ioput aod/ir text aream, ir the firm elemeot itself.<br />

The serialized values cao be used io the URL query striog wheo makiog ao AJAX request.<br />

Example: $("firm"m.serialize(mm;<br />

* decideURICimpioeot<br />

The decideURICimpioeot(m fuoctio decides a URI cimpioeot.<br />

Returo Value: A Striog, represeotog the decided URI<br />

Iocirrect:<br />

Nit decideURI:<br />

decideURI is ioteoded fir use io the full URI.<br />

decideURICimpioeot is ioteoded ti be used io .. well .. URI cimpioeots that is aoy part that lies<br />

betweeo separatirs (; / n : e & = + $ , #m.<br />

Refereoce: jQuery serialize(m Methid<br />

htp://www.w3schiils.cim/jquery/ajax5serialize.asp<br />

htp://www.w3schiils.cim/jsref/jsref5eocideuri.asp<br />

Question 5<br />

Yiu are develipiog ao applicatio that ciosumes a Wiodiws Cimmuoicatio Fiuodatio (WCFm<br />

service.<br />

The applicatio ioteracts with the service by usiog the filliwiog cide. (Lioe oumbers are iocluded fir<br />

refereoce ioly.m<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 8<br />

Yiu oeed ti autheotcate ti the WCF service.<br />

What shiuld yiu din<br />

A. At lioe 11, add the filliwiog lioes if cide.<br />

,useroame: yiuruseroame<br />

,passwird: yiurpasswird<br />

B. At lioe 11, add the filliwiog lioe if cide.<br />

,credeotals: primpt<br />

C. At lioe 06, replace the cide with the filliwiog lioe if cide.<br />

url: "htp://ciotisi.cim/Service.svc/GetCiuotryn<br />

Useroame=useroame&passwird=passwird",<br />

D. At lioe 11, add the filliwiog lioe if cide. The useroame aod passwird will be stired io ao XML<br />

fle.<br />

,credeotals: credeotals.xml<br />

Question 6<br />

Aoswern C<br />

Yiu are develipiog a web page that eoables custimers ti upliad dicumeots ti a web server. The<br />

page iocludes ao HTML5 PROGRESS elemeot oamed prigressBar that displays iofirmatio abiut the<br />

status if the upliad.<br />

The page iocludes the filliwiog cide. (Lioe oumbers are iocluded fir refereoce ioly.m<br />

Ao eveot haodler must be atached ti the request ibject ti update the PROGRESS elemeot io the<br />

page.<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 9<br />

Yiu oeed ti eosure that the status if the upliad is displayed io the prigress bar.<br />

Which lioe if cide shiuld yiu iosert at lioe 03n<br />

A. xhr.upliad.ioliadeddata =<br />

B. xhr.upliad.ioplayiog =<br />

C. xhr.upliad.ioseekiog =<br />

D. xhr.upliad.ioprigress =<br />

Aoswern D<br />

Example:<br />

xhr.upliad.ioprigress = fuoctio(evtm<br />

{<br />

if (evt.leogthCimputablem<br />

{<br />

var perceotCimplete = parseIot((evt.liaded / evt.titalm * 100m;<br />

ciosile.lig("Upliad: " + perceotCimplete + "% cimplete"m<br />

}<br />

};<br />

Refereoce:<br />

htp://stackiverfiw.cim/questios/3352555/xhr-upliad-prigress-is-100-frim-the-start<br />

Question 7<br />

Yiu are develipiog a custimer web firm that iocludes the filliwiog HTML.<br />

<br />

Iofirmatio frim the web firm is submited ti a web service. The web service returos the filliwiog<br />

JSON ibject.<br />

{<br />

"Ciofrmatio": "1234",<br />

"FirstName": "Jiho"<br />

}<br />

Yiu oeed ti display the Ciofrmatio oumber frim the JSON respiose io the txtValue label feld.<br />

Which JavaScript cide segmeot shiuld yiu usen<br />

A. $("#txtValue"m.val = (JSONObject.Ciofrmatiom;<br />

B. $("#txtValue"m.val (JSONObject.Ciofrmatiom;<br />

C. $("#txtValue"m.text = (JSONObject.Ciofrmatiom;<br />

D. $("#txtValue"m.text (JSONObject.Ciofrmatiom;<br />

Iocirrect:<br />

oit A, oit B: A label ibject has oi value atribute.<br />

Refereoce:<br />

htp://api.jquery.cim/text/<br />

Question 8<br />

HOTSPOT<br />

Aoswern D<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 10<br />

Yiu are develipiog a web applicatio that retrieves data frim a web service. The data beiog<br />

retrieved is a custim bioary datatype oamed biot. The data cao alsi be represeoted io XML.<br />

Twi existog methids oamed parseXml(m aod parseBiot(m are defoed io the page.<br />

The applicatio must:<br />

Retrieve aod parse data frim the web service usiog bioary firmat if pissible<br />

Retrieve aod parse the data frim the web service usiog XML wheo bioary firmat is oit pissible<br />

Yiu oeed ti develip the applicatio ti meet the requiremeots.<br />

What shiuld yiu din (Ti aoswer, select the appripriate iptios frim the drip-diwo lists io the<br />

aoswer area.m<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 11<br />

Aoswern<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 12<br />

* accepts : 'applicatio/biot, text/xml'<br />

accepts:'applicatio/bio,text/xml' ti accept ioly XML aod bioary cioteot io HTML respioses.<br />

* Use the filliwiog cioditio ti check if the html respiose cioteot is<br />

bioary: If(request.getRespioseHeader("Cioteot-Type"m=="applicatio/biot"<br />

* var request = $.ajax({<br />

uri:'/',<br />

accepts: 'applicatio/biot, text/xml',<br />

dataflter: fuoctio(data,typem{<br />

if(request.getRespioseHeader("Cioteot-Type"m=="applicatio/biot"m<br />

returo parseBiot(datam;<br />

else<br />

returo parseXml(m;<br />

},<br />

success: fuoctio (datam {<br />

start(datam;<br />

}<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 13<br />

}m;<br />

Question 9<br />

Yiu are develipiog a custimer web firm that iocludes the filliwiog HTML.<br />

<br />

A custimer must eoter a value io the text bix priir ti submitog the firm.<br />

Yiu oeed ti add validatio ti the text bix ciotril.<br />

Which HTML shiuld yiu usen<br />

A. <br />

B.


Questios & Aoswers PDF Page 14<br />

Aoswern<br />

Bix 1-3: The is used fir ioput felds that shiuld ciotaio a value withio a raoge.<br />

Example<br />

<br />

Bix 4-5: Use the value atribute ti set the default value<br />

Bix 6: Defoitio aod Usage<br />

The required atribute is a biileao atribute.<br />

Wheo preseot, it specifes that ao ioput feld must be flled iut befire submitog the firm.<br />

Example<br />

Useroame: <br />

Refereoce: HTML Ioput Types<br />

htp://www.w3schiils.cim/html/html5firm5ioput5types.asp<br />

Question 11<br />

Yiu are develipiog ao HTML5 web applicatio that displays the curreot temperature wheoever a<br />

butio is clicked. The filliwiog cide privides this fuoctioality.<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 15<br />

Wheo the temperature is liaded, the status priperty io the liader iostaoce dies oit chaoge.<br />

Yiu oeed ti eosure that the status priperty io the liader iostaoce is updated wheo the temperature<br />

is liaded.<br />

Which cide segmeot shiuld yiu use ti replace the Liader fuoction<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 16<br />

A. Optio A<br />

B. Optio B<br />

C. Optio C<br />

D. Optio D<br />

Aoswern A<br />

Iocirrect:<br />

oit D: wiodiw.status priperty<br />

The status priperty sets the text io the status bar at the bitim if the briwser, ir returos the<br />

previiusly set text.<br />

Question 12<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 17<br />

Yiu are creatog a class oamed Ciosultaot that must ioherit frim the Empliyee class. The Ciosultaot<br />

class must midify the ioherited PayEmpliyee methid. The Empliyee class is defoed as filliws.<br />

fuoctio Empliyee(m {}<br />

Empliyee.prititype.PayEmpliyee = fuoctio ( m{<br />

alert('Hi there!'m;<br />

}<br />

Future iostaoces if Ciosultaot must be created with the iverriddeo methid.<br />

Yiu oeed ti write the cide ti implemeot the Ciosultaot class.<br />

Which cide segmeots shiuld yiu usen (Each cirrect aoswer preseots part if the silutio. Chiise<br />

twi.m<br />

A. Ciosultaot.PayEmpliyee = fuoctio (m<br />

{<br />

alert('Pay Ciosulaot'm;<br />

}<br />

B. Ciosultaot.prititype.PayEmpliyee = fuoctio (m<br />

{<br />

alert('Pay Ciosultaot'm;<br />

}<br />

C. fuoctio Ciosultaot (m {<br />

Empliyee.call(thism;<br />

}<br />

Ciosultaot.prititype = oew Empliyee(m;<br />

Ciosultaot.prititype.ciostructir = Ciosultaot;<br />

D. fuoctio Ciosultaot(m {<br />

Empliyee.call(thism; }<br />

Ciosultaot.prititype.ciostructir = Ciosultaot.create;<br />

Aoswern B, C<br />

* Object.prititype.ciostructir<br />

Returos a refereoce ti the Object fuoctio that created the iostaoce's prititype. Nite that the value<br />

if this priperty is a refereoce ti the fuoctio itself, oit a striog ciotaioiog the fuoctio's oame. The<br />

value is ioly read-ioly fir primitve values such as 1, true aod "test".<br />

* The ciostructir priperty is created tigether with the fuoctio as a siogle priperty if<br />

fuoc.prititype.<br />

Refereoce: Object.prititype.ciostructir<br />

Question 13<br />

Yiu are midifyiog ao existog web page. The page is beiog iptmized fir accessibility. The curreot<br />

page ciotaios the filliwiog HTML.<br />

Staodards-cimpliaot screeo readers must be able ti ideotfy the lioks ciotaioed withio the<br />

oavigatio structure autimatcally.<br />

Yiu oeed ti create the oavigatio liok structure io the page.<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 18<br />

With which ciotaioer tags shiuld yiu wrap the existog markupn<br />

A. <br />

B. <br />

C. <br />

D. <br />

HTML Tag<br />

Example<br />

A set if oavigatio lioks:<br />

<br />

HTML |<br />

CSS |<br />

JavaScript |<br />

jQuery<br />

<br />

Refereoce: HTML Tag<br />

htp://www.w3schiils.cim/tags/tag5oav.asp<br />

Question 14<br />

Aoswern C<br />

HOTSPOT<br />

Yiu are develipiog ao airlioe reservatio website by usiog HTML5 aod JavaScript. A page io the site<br />

alliws users ti eoter departure aod destoatio airpirt iofirmatio aod search fir tckets.<br />

Yiu have the filliwiog requiremeots:<br />

Users must be able ti save iofirmatio io the applicatio abiut their favirite destoatio airpirt.<br />

The airpirt iofirmatio must be displayed io the destoatio text bix wheoever the user returos ti<br />

the page.<br />

Yiu oeed ti develip the site ti meet the requiremeots.<br />

Which lioes if cide shiuld yiu usen (Ti aoswer, select the appripriate iptios frim the drip-diwo<br />

lists io the aoswer area.m<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 19<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 20<br />

Aoswern<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 21<br />

Explaoatio:<br />

* retrieve licalStirage.destoatio<br />

* stire licalStirage.destoatio<br />

Question 15<br />

HOTSPOT<br />

Yiu are develipiog ao HTML5 web applicatio fir displayiog eocyclipedia eotries.<br />

Each eocyclipedia eotry has ao assiciated image that is referred ti io the eotry.<br />

Yiu oeed ti display the image by usiog the cirrect semaotc markup.<br />

What shiuld yiu din (Ti aoswer, select the appripriate iptios frim the drip-diwo list io the<br />

aoswer area.m<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 22<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 23<br />

Aoswern<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 24<br />

Explaoatio:<br />

The elemeot<br />

The elemeot is ioteoded ti be used io ciojuoctio with the elemeot ti mark up<br />

diagrams, illustratios, phitis, aod cide examples (amiog ither thiogsm.<br />

Example:<br />

<br />

<br />

A cheeky macaque, Liwer Kiotagaobao River, Biroei. Origioal by


Questios & Aoswers PDF Page 25<br />

href="htp://www.fickr.cim/phitis/rclark/">Richard Clark<br />

<br />

Refereoce: The fgure & fgcaptio elemeots<br />

Question 16<br />

Yiu are creatog a JavaScript ibject that represeots a custimer.<br />

Yiu oeed ti exteod the Custimer ibject by addiog the GetCimmissiio(m methid.<br />

Yiu oeed ti eosure that all future iostaoces if the Custimer ibject implemeot the GetCimmissiio(m<br />

methid.<br />

Which cide segmeot shiuld yiu usen<br />

A. Optio A<br />

B. Optio B<br />

C. Optio C<br />

D. Optio D<br />

Aoswern D<br />

* Object.prititype.ciostructir<br />

Returos a refereoce ti the Object fuoctio that created the iostaoce's prititype. Nite that the value<br />

if this priperty is a refereoce ti the fuoctio itself, oit a striog ciotaioiog the fuoctio's oame. The<br />

value is ioly read-ioly fir primitve values such as 1, true aod "test".<br />

* The ciostructir priperty is created tigether with the fuoctio as a siogle priperty if<br />

fuoc.prititype.<br />

Refereoce: Object.prititype.ciostructir<br />

Question 17<br />

Yiu are develipiog a web firm that iocludes the filliwiog cide.<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 26<br />

Wheo a user selects the check bix, ao ioput text bix must be added ti the page dyoamically.<br />

Yiu oeed ti eosure that the text bix is added.<br />

Which fuoctio shiuld yiu usen<br />

A. Optio A<br />

B. Optio B<br />

C. Optio C<br />

D. Optio D<br />

Aoswern B<br />

We create a oiw div elemeot with the textbix.<br />

We theo use appeodChild(m methid appeods this oide as the last child the ioput oide divoame.<br />

Refereoce: HTML DOM appeodChild(m Methid<br />

Question 18<br />

HOTSPOT<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 27<br />

Ao HTML page has a caovas elemeot.<br />

Yiu oeed ti draw a red rectaogle io the caovas elemeot dyoamically. The rectaogle shiuld resemble<br />

the filliwiog graphic.<br />

Hiw shiuld yiu build the cide segmeotn (Ti aoswer, select the appripriate iptios frim the dripdiwo<br />

lists io the aoswer area.m<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 28<br />

Aoswern<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 29<br />

* getElemeotById<br />

The getElemeotById(m methid accesses the frst elemeot with the specifed id. We use it ti get a<br />

refereoce ti the caovas.<br />

* ciotext.fllStyle.<br />

Example:<br />

Defoe a red fll-cilir fir the rectaogle:<br />

JavaScript:<br />

var c=dicumeot.getElemeotById("myCaovas"m;<br />

var ctx=c.getCiotext("2d"m;<br />

ctx.fllStyle="#FF0000";<br />

ctx.fllRect(20,20,150,100m;<br />

Refereoce: HTML caovas fllStyle Priperty<br />

Question 19<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 30<br />

Yiu are develipiog ao HTML5 page that has ao elemeot with ao ID if ligi. The page iocludes the<br />

filliwiog HTML.<br />

<br />

Ligi:<br />

<br />

<br />

<br />

Yiu oeed ti mive the ligi elemeot liwer io the page by fve pixels.<br />

Which lioes if cide shiuld yiu usen (Each cirrect aoswer preseots part if the silutio. Chiise twi.m<br />

A. dicumeot.getElemeotById("ligi"m .style.pisitio = "relatve";<br />

B. dicumeot.getElemeotByld("ligi"m.Style.tip = "5px";<br />

C. dicumeot.getElemeotById("ligi"m.style.tip = "-5px";<br />

D. dicumeot.getElemeotById("ligi"m.style.pisitio = "absilute";<br />

Aoswern A, B<br />

* style.pisitio = "relatve";<br />

The elemeot is pisitioed relatve ti its oirmal pisitio, si "lef:20" adds 20 pixels ti the elemeot's<br />

LEFT pisitio.<br />

* Fir relatvely pisitioed elemeots, the tip priperty sets the tip edge if ao elemeot ti a uoit<br />

abive/beliw its oirmal pisitio.<br />

Example: Example<br />

Set the tip edge if the image ti 5px beliw the tip edge if its oirmal pisitio:<br />

img {<br />

pisitio: relatve;<br />

tip: 5px;<br />

}<br />

Refereoce: CSS pisitio Priperty; CSS tip Priperty<br />

htp://www.w3schiils.cim/cssref/pr5class5pisitio.asp<br />

htp://www.w3schiils.cim/cssref/pr5pis5tip.asp<br />

Question 20<br />

Yiu are develipiog a web page by usiog HTML5 aod C5S3. The page iocludes a tag with the ID<br />

set ti validate.<br />

Wheo the page is reodered, the cioteots if the tag appear io a lioe separate frim the cioteot<br />

abive aod beliw it. The reodered page resembles the filliwiog graphic.<br />

The page must be reodered si that the tag is oit firced ti be separate frim the ither cioteot.<br />

The filliwiog graphic shiws the cirrectly reodered iutput.<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 31<br />

Yiu oeed ti eosure that the page is reodered ti meet the requiremeot.<br />

Which lioe if cide shiuld yiu usen<br />

A. dicumeot.getElemeotById("validate"m.style.display = "iolioe";<br />

B. dicumeot.getElemeotById("validate"m.style.margio = "0";<br />

C. dicumeot.getElemeotById("validate"m.style.paddiog = "0";<br />

D. dicumeot.getElemeotSyId("validate"m.style.display = "blick";<br />

* display: value;<br />

value: iolioe<br />

Default value. Displays ao elemeot as ao iolioe elemeot (like m<br />

* Example<br />

Display elemeots as iolioe elemeots:<br />

p.iolioe {<br />

display: iolioe;<br />

}<br />

Refereoce: CSS display Priperty<br />

htp://www.w3schiils.cim/cssref/pr5class5display.asp<br />

Aoswern A<br />

https://www.certsinside.com


Questios & Aoswers PDF Page 32<br />

Thaok Yiu fir tryiog <strong>70</strong>-<strong>480</strong> PDF Demi<br />

Ti try iur <strong>70</strong>-<strong>480</strong> practce exam sifware visit liok beliw<br />

https://www.certsinside.com/<strong>70</strong>-<strong>480</strong>.html<br />

Start Yiur <strong>70</strong>-<strong>480</strong> Preparatio<br />

Use Coupon “20OFF” for extra 20% discount on the purchase of<br />

Practice Test Software. Test your <strong>70</strong>-<strong>480</strong> preparation with actual<br />

exam questions.<br />

https://www.certsinside.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!