Upwork Test Answer DHTML Skill Test Latest

DHTML Skill Test

Question: 01
After clicking on a link, your main browser window spawns a small new window and writes some text on it. When both the window page sources are viewed, the small window page source seems identical to that of the large one. Which of the following makes this happen?
Answers:
Since the new window has no filename, it receives the source code of its parent


Question: 02
DHTML is a standard defined by the World Wide Web Consortium.
Answers:
False


Question: 03
How would you double the image size of an Image on a mouseover event, if the original width and height are 100px and id is logo?
Answers:
document.getElementById('logo').style.width="200" document.getElementById('logo').style.height="200"

Question: 04
Choose another way to write x ? a = b : a = c
Answers:
if ('x') { a = b; } else { a = c; }


Question: 05
For making the text transparent, the mask filter can be used like:
Answers:
mask(color=#ffffff)


Question: 06
Consider the following validate function:

<script type="text/javascript">
function ValidateField()
{
        if(document.forms[0].txtId.value =="")
                {return false;}

        return true;
}
</script>

This function should be called as soon as the user leaves the field. What will you do?
Answers:
<input name=txtId type="text" onblur="return ValidateField()">


Question: 07
An HTML form has 10 checkboxes which are all named "chkItems". Which JavaScript function can be used for checking all the checkboxes together?
Answers:
function CheckAll() { for (z = 0; z < document.forms[0].chkItems.length; z++) { document.forms[0].chkItems.list[z].checked=true } }


Question: 08
Following is a sample CSS style:

1. p
2. (
3. font-family:arial
4. color:black
5. text-align:left
6. );

What are the corrections required in this style?

Answers:
All of the above


Question: 09
Consider an HTML form with a checkbox and a text field. When data is entered and the Enter key is pressed, the data seems to be lost before the user can click on the button that calls the processing function. How would you correct this programmatically?
Answers:
Add 'return false' to onsubmit="..." in the FORM tag


Question: 10
Given below is a window.open function:

window.open(url,name,"attributes")

How will you ensure that different URLs open in the same window?

Answers:
By keeping the second attribute name same


Question: 11
Consider the three variables:

someText = 'JavaScript1.2';
pattern = /(\w+)(\d)\.(\d)/i;
outCome = pattern.exec(someText);

What does pattern.ignoreCase contain?

Answers:
true


Question: 12
DHTML uses a combination of:
Answers:
All of the above


Question: 13
Which of the following has the higest priority in CSS?
Answers:
user defined


Question: 14
What does DHTML Stand For?
Answers:
Dynamic HTML


Question: 15
Which of the following functions copies and returns a node?
Answers:
cloneChild(node)


Question: 16
Which of the following is not a DOM Mouse Event?
Answers:
oninit


Question: 17
Which of the following code will display the text “Invisible Man”?  
<div id="name" class="person">The Invisible Man</div>
Answers:
All three codes will not display the text “Invisible Man”


Question: 18
Which of the following correctly describes Layer attribute "src"?
Answers:
The external html document contained inside the layer


Question: 19
Which of the following is TRUE about data binding feature of DHTML?
Answers:
All are true


Question: 20
Which of the following is an INVALID event?
Answers:
onRun


Question: 21
Which of the following is a DHTML technology?
Answers:
three choices are DHTML technology


Question: 22
Which DHTML technology does the following code utilize? document.write(Date());
Answers:
JavaScript


Question: 23
True or False. CSS supports child selector.
Answers:
True


Question: 24
True or False. DHTML can be used in conjunction with AJAX.
Answers:
True


Question: 25
True or False. DHTML can be used in conjunction with HTML5.
Answers:
True


Question: 26
True or False? DHTML is a single technology.
Answers:
False


Question: 27
Event bubbling is useful because of which of the following reasons?
Answers:
All are valid reasons


Question: 28
Which of the following is not a VALID component of DHTML?
Answers:
VB


Question: 29
What kind of scripting language is DHTML?
Answers:
Client


Question: 30
Which of the following tags can be used for moving text Up to down or left ot right or vise versa?
Answers:
<marquee>


Question: 31
Which of the following is TRUE about code written in <% %>?
Answers:
It is treated as server side code in scripting languages.


Question: 32
Which of the following is not a typical use of DHTML?
Answers:
Data Entry


Question: 33
Which of the following is TRUE about appendChild(newNode)?
Answers:
It inserts the new node to the end of the list of children of the node


Question: 34
Which of the following tags can be used to refer a .css file in a web page?
Answers:
<link>


Question: 35
What does document.getElementById("intro") function returns if "intro" does not exist?
Answers:
Returns null


Question: 36
Which of the following properties/methods would you use to animate a div section moving across the screen?
Answers:
All three choices could be used


Question: 37
Which of the following is an INVALID nodeType?
Answers:
4


Question: 38
Which DHTML technology does the following code utilize?  document.getElementById('id').style.color = 'blue';
Answers:
JavaScript, DOM and CSS


Question: 39
What is the color of “Rainbow” in the following code?  
<style> div {color:blue;} </style>
<div id="Rainbow" color="green" style="color:red;">Hello World</div>
<script> document.getElementById('Rainbow').style.color = 'yellow'; </script>
Answers:
yellow


Question: 40
Which of the following code will reliably display the current date in most major browsers?
Answers:
document.getElementById('id').innerHTML = Date();


Question: 41
Which of the following is NOT TRUE about DOM
Answers:
"document" tag is under the <HTML> tag


Question: 42
What technology does DHTML use to produce dynamic content?
Answers:
CSS and JavaScript


Question: 43
Which of the following will cancel the default action of onclick event in IE?
Answers:
Either by returning "false" from the event handler or by setting window.event.returnValue to "false


Question: 44
Which of the following is TRUE about function  : document.addEventListener("DOMContentLoaded", testFunc, false)?
Answers:
The function testFunc() will run as soon as the DOM for the document has fully initialized


Question: 45
What value is displayed in the following code?  
<div id="id">0</div>
<script> document.getElementById('id').innerHTML = 1 document.getElementsByTagName('div').innerHTML = 2 document.getElementsByTagName('div')[0].innerHTML = 3 </script>
Answers:
3


Question: 46
Which of the following events do all Forms have by default?
Answers:
Both submit and reset event


Question: 47
True or False? JQuery is a DHTML technology.
Answers:
False


Question: 48
Which of the following functions can be used to stop the event from traversing the rest of the document?
Answers:
stopPropagation()


Question: 49
Which of the following is true about the function : object.addEventListener(click, doThis, capture)?
Answers:
capture = "true" will cause doThis() to be executed when onClick() event is detected at the capture phase


Question: 50
Which statement about the difference between DHTML and HTML is true?
Answers:
All three statements are true


Question: 51
Which of the following is not a CSS media type?
Answers:
mobile


Question: 52
Which of the following is FALSE about DIV?
Answers:
DIV is used to select inline text


Question: 53
What is the child object appended in the appendChild() method?
Answers:
last child of the referenced node


Question: 54
Which of the following is a valid way to restrict autocomplete of a form?
Answers:
autocomplete=”off”


Question: 55
Which of the following is NOT TRUE about DHTML?
Answers:
DHTML is a scripting language


Question: 56
Which of the following code will flicker the text?
Answers:
<div id='flicker'>Flicker</div> <script> function toggle() { setInterval(function() { var elm = document.getElementById('flicker'); if (elm.style.display == 'none&


Question: 57
Which of the following function is used for retrieving a XML file in IE5+?
Answers:
ActiveXObject()


Question: 58
What is the difference between font-size and fontSize?
Answers:
font-size is a CSS property and fontSize is a DOM attribute


Question: 59
Which of the following is FALSE about addEventListener?
Answers:
The first argument accepts the function to occur on the event


Question: 60
Which of the following is TRUE about code written in <%= %>?
Answers:
It is used for accessing any server side variable into the HTML (in .aspx) page


Question: 61
Which javascipt elements allow control in DHTML?
Answers:
HTML element


Question: 62
Which of the following is FALSE about SPAN?
Answers:
SPAN has ALIGN attribute in it


Question: 63
Which of the following is TRUE about cancelling event bubbling and event default action?
Answers:
Canceling an event's bubbling doesn't cancel its default action


Question: 64
Which of the following is FALSE about DOM?
Answers:
DOM is a language dependent convention


Question: 65
What does the Node.nodeType property returns?
Answers:
an integer representing the type of the node


Question: 66
Which of the following is FALSE about DHTML?
Answers:
DHTML does not allows scripting languages to change variables in a web page's definition language


Question: 67
Which of the following is an INVALID method for accessing HTML attributes using the DOM?
Answers:
addAttribute()


Question: 68
Which of the following is NOT a way to apply css to a web page?
Answers:
None of these are ways to apply css to a web page.


Question: 69
Which of the follow link will trigger an alert message that displays  ‘myID’?
Answers:
<a id="myID" href="#" onclick="myFunc(this)" />click</a>


Question: 70
What statement about the marquee tag is false?
Answers:
works only on text elements


Question: 71
Which of the following function is used for restricting events to propogate to parent in IE?
Answers:
window.event.cancelBubble


Question: 72
What does the function "document.styleSheets.length" returns?
Answers:
Total # of external style sheets


Question: 73
True or False? DHTML is a predecessor of HTML5.
Answers:
False


Question: 74
True or False. The appendChild() method can be used to move an element from one element to another.
Answers:
True


Question: 75
What is the difference between DOM Node and Element?
Answers:
Node is the parent type of Element


Question: 76
What is the correct way to access a parent node?
Answers:
element.parentNode


Question: 77
What does document.body.nodeType returns?
Answers:
1


Question: 78
What does element.childNodes return?
Answers:
a nodeList of child nodes


Question: 79
What is the event name which gets triggered when the submit button is pressed on the form?
Answers:
onClick


Question: 80
What is the color of “Rainbow” in the following code?  
<style>     div {color:blue;} </style>
<script> document.getElementById('id').style.color = 'yellow'; </script>
<div id="id" color="green" style="color:red;">Rainbow</div>
Answers:
red


Question: 81
What value is displayed in the following code?  
<div id="id">0</div> <script>
document.getElementById('id').innerText = 1 document.getElementsByTagName('div').innerText = 2 document.getElementsByTagName('div')[0].innerText = 3
Answers:
depends on the browser


Question: 82
What is the color of “Rainbow” in the following code?  <style>     div {color:blue !important;} </style> <div id="id" color="green" style="color:red !important;">Rainbow</div> <script> document.getElementById('id').style.color = 'yellow !important'; </script>
Answers:
red


Question: 83
Which of the following attributes is not involved in layer?
Answers:
align


Question: 84
Which of the following is not a DOM Event Property?
Answers:
name


Question: 85
Which of the following is TRUE about replaceChild(Node1, Node2)?
Answers:
Replace Node2 with Node1


Question: 86
Which of the following is not a DHTML technology?
Answers:
AJAX


Question: 87
Which of the following is TRUE about iFrame?
Answers:
iframe is used for creating an inline or floating frame


Question: 89
Which of the following tags checks the nested body content of a tag  and determine whether the specified value is an appropriate substring of the requested variable?
Answers:
<logic>



Question: 90
Which of the following code will flicker the text?

Answers:
<div id='flicker'>Flicker</div> <script> function toggle() { setInterval(function() { var elm = document.getElementById('flicker'); if (elm.style.display == 'none&


You may see another Upwork Test Answers >> Upwork Test Answer PHP 5 Skill Test

Don't Miss A Single Updates

Remember to check your email account to confirm your subscription.

Blogger
Disqus
Post a comment ➜

No Comment