DHTML 2015

1. What does DHTML Stand For?
Answers:
• Dynamic HTML
• Data-Binding HTML
• Document HTML
• Digital HTML

2. Which of the following functions copies and returns a node?
Answers:
• copy(node)
• copyChild(node)
• deepCopy(node)
• cloneChild(node)
3. Which of the following is not a DOM Mouse Event?
Answers:
• ondblclick
• onclick
• onmouseup
• oninit
4. 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”
• document.getElementsByTagName('div')[0].style.display = 'none';
• document.getElementsByClassName('person')[0].style.display = 'none';
• document.getElementById('name').style.display = 'none';
5. Which of the following correctly describes Layer attribute "src"?
Answers:
• The name of the layer
• The external html document contained inside the layer
• The width of the layer
• The height of the layer
6. Which of the following is TRUE about data binding feature of DHTML?
Answers:
• It automatically and dynamically generate tables in your document
• Lets you easily bind individual elements in your document to data from another source
• It helps to bind the fields in a form to fields in a record
• All are true
7. Which of the following is an INVALID event?
Answers:
• onMouseDown
• onMouseOver
• onRun
• onMouseOut
8. Which of the following is a DHTML technology?
Answers:
• CSS
• HTML
• three choices are DHTML technology
• JavaScript
9. Which DHTML technology does the following code utilize? document.write(Date());
Answers:
• HTML
• None of these
• CSS
• JavaScript
10. True or False. CSS supports child selector.
Answers:
• False
• True
11. True or False. DHTML can be used in conjunction with AJAX.
Answers:
• True
• False
12. True or False. DHTML can be used in conjunction with HTML5.
Answers:
• True
• False
13. True or False? DHTML is a single technology.
Answers:
• True
• False
14. Event bubbling is useful because of which of the following reasons?
Answers:
• Reduces the amount of overall code in the Web page
• Allows multiple common actions to be handled centrally
• Reduces the number of code changes required to update a document
• All are valid reasons
15. Which of the following is not a VALID component of DHTML?
Answers:
• VB
• DOM
• Absolute Positionin
• Conventional HTML
16. What kind of scripting language is DHTML?
Answers:
• Neither Client nor Server
• Server
• Client
• Both Client and Server
17. Which of the following tags can be used for moving text Up to down or left ot right or vise versa?
Answers:
• <move>
• <marquee>
• <horizontal>
• <scroll>
18. Which of the following is TRUE about code written in <% %>?
Answers:
• It is used to bind the particular column with the database value when the Autogenerate column of the binding control is false
• It is treated as code comments
• It is used for special HTML tags
• It is treated as server side code in scripting languages
19. Which of the following is not a typical use of DHTML?
Answers:
• Data Entry
• Rollover Buttons
• Simple Animation
• Input Validation
20. Which of the following is TRUE about appendChild(newNode)?
Answers:
• It inserts the new node at the beginning of the list of children of the node
• It inserts the new node to the end of the list of children of the node
• It inserts the new node but not necessarily at the beginning or end of list of children of the node
• It is used for moving nodes
21. Which of the following tags can be used to refer a .css file in a web page?
Answers:
• <css>
• <stylesheet>
• <text>
• <link>
22. What does document.getElementById("intro") function returns if "intro" does not exist?
Answers:
• Returns 0
• Returns false
• Returns null
• Create an element with id = "intro" and return that element
23. 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
• element.offsetTop
• window.setTimeout()
• element.clientHeight
24. Which of the following is an INVALID nodeType?
Answers:
• 1
• 3
• 4
• 2
25. Which DHTML technology does the following code utilize?  document.getElementById('id').style.color = 'blue';
Answers:
• DOM
• CSS
• JavaScript
• JavaScript, DOM and CSS
26. 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:
• red
• yellow
• blue
• green
27. Which of the following code will reliably display the current date in most major browsers?
Answers:
• document.getElementById('id').innerText= Date();
• document.getElementById('id').innerHtml = Date();
• document.getElementById('id').innerTEXT= Date();
• document.getElementById('id').innerHTML = Date();
28. Which of the following is NOT TRUE about DOM
Answers:
• "document" tag is under the <HTML> tag
• DOM has a hierarchical structure
• <HTML> tag is under the "document"
• "document" refers to the actual page
29. What technology does DHTML use to produce dynamic content?
Answers:
• CSS
• JavaScript
• CSS and JavaScript
• AJAX
30. 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
• Neither by returning "false" from the event handler nor by setting window.event.returnValue to "false
• Only by setting window.event.returnValue to "false and NOT by returning "false" from the event handler
• Only by returning "false" from the event handler and NOT by setting window.event.returnValue to "false
31. Which of the following is TRUE about function  : document.addEventListener("DOMContentLoaded", testFunc, false)?
Answers:
• the function testFunc() will run as soon as user defined DOMContentLoaded() function returns
• The function testFunc() will always be invoked
• The function testFunc() will run as soon as the DOM for the document has fully initialized
• The function testFunc() will never be invoked
32. 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:
• 2
• 3
• None of these
• 0
33. Which of the following events do all Forms have by default?
Answers:
• Only reset event
• Neither submit nor reset
• Both submit and reset event
• Only submit event
34. True or False? JQuery is a DHTML technology.
Answers:
• True
• False
35. Which of the following functions can be used to stop the event from traversing the rest of the document?
Answers:
• stopEvent()
• hault()
• stopPropagation()
• fireEvent()
36. Which of the following is true about the function : object.addEventListener(click, doThis, capture)?
Answers:
• capture = "false" will cause doThis() to return null when onClick() event is detected at the capture phase
• capture = "false" will cause doThis() to be executed when onClick() event is detected at the capture phase
• capture = "true" will cause doThis() to be executed when onClick() event is detected at the bubble phase
• capture = "true" will cause doThis() to be executed when onClick() event is detected at the capture phase
37. Which statement about the difference between DHTML and HTML is true?
Answers:
• All three statements are true
• HTML is markup language while DHTML is not a language
• HTML cannot connect to database while DHTML can connect to database
• HTML cannot have server side code while DHTML may have server side code
38. Which of the following is not a CSS media type?
Answers:
• print
• screen
• all
• mobile
39. Which of the following is FALSE about DIV?
Answers:
• DIV is used to select a block of text so that one can apply styles to it
• DIV tag is used as a paragraph break as it creates a logical division of the document in which it is applied
• DIV is used to select inline text
• DIV has ALIGN attribute in it
40. What is the child object appended in the appendChild() method?
Answers:
• last child of the referenced node
• first child of the referenced node
• after the referenced node
• before the referenced node
41. Which of the following is a valid way to restrict autocomplete of a form?
Answers:
• complete=”off”
• autocomplete=”false”
• complete=”false”
• autocomplete=”off”
42. Which of the following is NOT TRUE about DHTML?
Answers:
• DHTML is a scripting language
• DHTML is NOT a scripting language
• DHTML is the combination of several built-in browser features in fourth generation browsers
• DHTML is a collection of features that together, enable your web page to be dynamic
43. 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&
• <div id='flicker'>Flicker</div> <script> function toggle() { setInterval(function() { var elm = document.getElementById('flicker'); if (elm.display == 'none')
• <div id='flicker'>Flicker</div> <script> function toggle() { setTimout(function() { var elm = document.getElementById('flicker'); if (elm.display == 'none')
• <div id='flicker'>Flicker</div> <script> function toggle() { setTimout(function() { var elm = document.getElementById('flicker'); if (elm.style.display == 'none
44. Which of the following function is used for retrieving a XML file in IE5+?
Answers:
• GetXML()
• load()
• ActiveXObject()
• LoadXML()
45. What is the difference between font-size and fontSize?
Answers:
• font-size is a DOM property and fontSize is a CSS attribute
• font-size is a CSS property and fontSize is a DOM attribute
• font-size is a CSS attribute and fontSize is a DOM property
• font-size is a DOM attribute and fontSize is a CSS property
46. Which of the following is FALSE about addEventListener?
Answers:
• The first argument accepts the function to occur on the event
• The second argument accepts the function to occur on the event
• It adds an event listener to the node it is "run from"
• The first argument accepts what type of event to detect
47. 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
• It is used to bind the particular column with the database value when the Autogenerate column of the binding control is false
• It is used for special HTML tags
• It is treated as server side code in scripting languages
48. Which javascipt elements allow control in DHTML?
Answers:
• CSS element
• HTML element
• XHTML element
• XML element
49. Which of the following is FALSE about SPAN?
Answers:
• SPAN is used to apply styles inline.
• SPAN is used to select inline text and lets users to apply styles to it
• SPAN has ALIGN attribute in it
• SPAN simply applies the same style and alignment as specified
50. Which of the following is TRUE about cancelling event bubbling and event default action?
Answers:
• Canceling an event's default action also cancel event bubbling
• Both default action and event bubbling cannot be cancelled
• Canceling an event's bubbling also cancel its default action
• Canceling an event's bubbling doesn't cancel its default action
51. Which of the following is FALSE about DOM?
Answers:
• DOM is a language dependent convention
• Objects in the DOM tree may be addressed and manipulated by using methods on the objects
• DOM is a cross-platform
• DOM is a language-independent convention
52. What does the Node.nodeType property returns?
Answers:
• a string representing the name of the node
• a Boolean representing node or element
• an object representing the type of the node
• an integer representing the type of the node
53. Which of the following is FALSE about DHTML?
Answers:
• In DHTML there may not be any interaction between the client and server after the page is loaded
• DHTML does not allows scripting languages to change variables in a web page's definition language
• DHTML allows scripting languages to change variables in a web page's definition language
• DHTML page is request/reload-based
54. Which of the following is an INVALID method for accessing HTML attributes using the DOM?
Answers:
• setAttribute()
• addAttribute()
• getAttribute()
• removeAttribute()
55. Which of the following is NOT a way to apply css to a web page?
Answers:
• linked
• None of these are ways to apply css to a web page.
• embedded
• inline
56. Which of the follow link will trigger an alert message that displays  ‘myID’?
Answers:
• <a id="myID" href="#" onclick="myFunc(this)" />click</a>
• <a id="myID" href="javascript:myFunc(this)" />click</a>
• <a id="myID" href="#" onclick="javascript::myFunc(this)" />click</a>
• <a id="myID" href="myFunc(this)" />click</a>
57. What statement about the marquee tag is false?
Answers:
• supports up/down scrolling
• is a non-stand HTML element
• supports continuous scrolling
• works only on text elements
58. Which of the following function is used for restricting events to propogate to parent in IE?
Answers:
• window.event.cancelEvent
• window.event.cancel
• window.event.stopEvent
• window.event.cancelBubble
59. What does the function "document.styleSheets.length" returns?
Answers:
• Size of first external style sheet
• Total # of external style sheets
• Total size of all external style sheets
• Length of inline style sheet
60. True or False? DHTML is a predecessor of HTML5.
Answers:
• True
• False
61. True or False. The appendChild() method can be used to move an element from one element to another.
Answers:
• True
• False
62. What is the difference between DOM Node and Element?
Answers:
• Node is a property of Element
• Element is a property of Node
• Element is the parent type of Node
• Node is the parent type of Element
63. What is the correct way to access a parent node?
Answers:
• element.up()
• element.parent()
• element.parentNode
• element.parentNode()
64. What does document.body.nodeType returns?
Answers:
• 0
• 1
• undefined
• 2
65. What does element.childNodes return?
Answers:
• a nodeList of child nodes
• an array of child nodes
• a pointer to the first child node
• a collection of child nodes
66. What is the event name which gets triggered when the submit button is pressed on the form?
Answers:
• onMousePressed
• onSubmit
• onEvent
• onClick
67. 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:
• green
• red
• blue
• yellow
68. 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:
• 0
• 2
• depends on the browser
• 1
69. 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:
• yellow
• blue
• green
• red
70. Which of the following attributes is not involved in layer?
Answers:
• id
• width
• align
• tag
71. Which of the following is not a DOM Event Property?
Answers:
• bubbles
• target
• name
• type
72. Which of the following is TRUE about replaceChild(Node1, Node2)?
Answers:
• Replace Node1 with Node2
• Replace first child in Node 2 with first child in Node1
• Replace Node2 with Node1
• Remove Node1 and Node2
73. Which of the following has the higest priority in CSS?
Answers:
• inline
• !important
• user defined
• linked
74. Which of the following is not a DHTML technology?
Answers:
• AJAX
• DOM
• All three choices are DHTML technology
• HTML
75. Which of the following is TRUE about iFrame?
Answers:
• An inline frame places another HTML document in a frame.
• iframe is used to embed or insert content on a page of padding
• All are invalid
• iframe is used for creating an inline or floating frame
76. 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>
• <eval>
• <match>
• <evaluate>
77. Which of the following code will flicker the text?
Answers:
• <div id='flicker'>Flicker</div> <script> function toggle() { setTimout(function() { var elm = document.getElementById('flicker'); if (elm.style.display == 'none
• <div id='flicker'>Flicker</div> <script> function toggle() { setInterval(function() { var elm = document.getElementById('flicker'); if (elm.style.display == 'none&
• <div id='flicker'>Flicker</div> <script> function toggle() { setTimout(function() { var elm = document.getElementById('flicker'); if (elm.display == 'none')

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

No comments:

Post a Comment