Multiple question HTML,javascript,jquery 1) Converting a string respresing a num
ID: 3862769 • Letter: M
Question
Multiple question HTML,javascript,jquery
1) Converting a string respresing a number (e.g."20") to a number data type.
a) can be accomplished with the Number funcation.
b) occurs automatically when applying the "+" operater to it.
c) isnt neccessary since web forms automatically provide number data types.
d) is required for displaying output in HTML code.
2) The jquery delegate mehod is useful for
a) extending the funcatipnality of a javascript object.
b)hiding unused widgets.
c)authentication users.
d) binding event handlers to pages element that dont exits yet.
3) The policy that prevents a javascripts-enabled web page from Ajax requests to a third partyservice is the
a) restricted authentication policy.
b) JSON protocol policy
c) same origin policy.
d) secure request policy
4) when using coffeescript,nested structue are indicated with
a) curly braces.
b) squre brackets
c) same origin policy
d) secure request policy
5) for coffeescript, local varriable
a) can be accessed provided that they are refrenced in the same file.
b) automatically declared when they are used in a funcation
c) must be explicty declared in a var statement
d) are not allowed
6) Ajax communcation in Javascripts.
a) is synchronous
b) typically uses JSON as a data language
c) requires reloading the web page to present recevide data.
d) isnt support with Jquery.
Explanation / Answer
1.
a,b,c
a.javascript has number function where we can pass string as arguement.
b.appending + infront can do the same
like num ="23"
then +num = 23
c. web form will by default has controls with number as format , check with input tag with number as format
2.
a. it extends a functionality
like this
$(selector).delegate(childSelector,event,data,function)
3.c
all client scripts should be from same origin (cross domain access is restricted)
all should in same domain.
for example if we have a page and an iframe on the same page. where iframe holds a page from different domain.
then script from page cannot access iframe contents because they are not from same origin.
4.a
curly braces
5.c
must be explicity declared using var.
Example:
6.b
it will use JSON as data language , all ajax call should be asynchronous and mostly on client side.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.