Archive Pages Design$type=blogging

Solved MCQ on Scripting Documents in JavaScript set-5

1) The DOM defines a number of ways to select elements, by using which of the following methods we can query a document for an element or el...

1) The DOM defines a number of ways to select elements, by using which of the following methods we can query a document for an element or elements.

i) with a specified id attribute

ii) with a specified name attribute

iii) with the specified tag name

iv) with the specified CSS class or classes

A. i, ii and iii only

B. i, ii and iv only

C. i, iii and iv only

D. All i, ii, iii and iv



2) We can select an element based on unique ID with the ........... method of the document object.

A. getElementById()

B. getElementsById()

C. selectElementById()

D. selectElementsById()



3) The ......... attribute is only valid on a handful or HTML elements, including forms, form elements, <iframe> and <img> elements.

A. id

B. name

C. tag

D. class



4) .......... return NodeList objects and properties like document.images and document.forms are HTML Collection objects.

A. getElementsByName() and getElementsById()

B. getElementsById() and getElementsByTagName()

C. getElementsByName() and getElementsByTagName()

D. getElementsByClassName() and getElementsByTagName()



5) Like getElementsByTagName(), .......... can be invoked on both HTML documents and HTML elements, and it returns a live NodeList containing all matching descendants of the document or element.

A. getElementsById()

B. getElementsByName()

C. getElementsByClassName()

D. All of the above



6) .......... takes a single string argument containing a CSS selector and returns a Nodelist that represents all elements in the document that match the selector.

A. getElementsById()

B. getElementsByName()

C. getElementsByClassName()

D. querySelectorAll()



7) ........... is the ultimate element selection method and very powerful technique by which client side JavaScript programs can select the document elements that they are going to manipulate.

A. querySelectAll()

B. querySelector()

C. querySelectorAll()

D. querySelect()



8) The CSS selector ............ selects any <span> descendant of the element with id="log".

A. #log span

B. #log>span

C. #log=span

D. #log:span



9) The CSS selector ............ selects any <span> child of the element with id="log".

A. #log span

B. #log>span

C. #log=span

D. #log:span



10) The CSS selector .......... selects all <div> elements plus the element with id="log".

A. div #log

B. div.#log

C. div>#log

D. div, #log



11) ........... defines properties for the universal HTTP attributes such as id, title lang, and dir and event handler properties like onClick.

A. Element properties

B. HTMLElement

C. HTMLProperty

D. HTMLAttribute



12) ......... are not case sensitive, but JavaScript property names are.

A. Element properties

B. HTML element

C. HTML property

D. HTML attributes



13) .............. methods can be used to query and set non standard HTML attributes and to query and set attributes on elements of an XML document.

A. getAttribute() and setAttribute()

B. getElement() and setElement()

C. getDocument() and setDocument()

D. getHTML() and setHTML()



14) HTML elements defines two methods ............ to check for the presence of named attribute and remove an attribute entirely.

A. getAttribute() and setAttribute()

B. hasAttribute() and removeAttribute()

C. hasDocument() and removeDocument()

D. hasElement() and removeElement()



15) For XML documents the include attributes from other namespaces, can use the namespace variants of which of the following method(s).

A. getAttributeNS()

B. setAttributeNS()

C. hasAttributeNS()

D. All of the above


Answers:

1) D. All i, ii, iii and iv
2) A. getElementById()
3) B. name
4) C. getElementsByName() and getElementsByTagName()
5) C. getElementsByClassName()
6) D. querySelectorAll()
7) C. querySelectorAll()
8) A. #log span
9) B. #log>span
10) D. div, #log
11) B. HTMLElement
12) D. HTML attributes
13) A. getAttribute() and setAttribute()
14) B. hasAttribute() and removeAttribute()
15) D. All of the above


Related Posts:

For more Multiple Choice Questions (MCQs): Click Here


تعليقات

الاسم

Artificial Intelligence(AI) Backlinking Basic IT Best List Blogging Tips C C# C++ Computer Architecture Computer Fundamental Computer Security Computer/IT Officer Exam CSS Data Mining and Warehousing Data Recovery Tools Data Structure Database Management System E-commerce E-government Internet & Web Designing IT Law IT Tips and Tricks IT Tutorials Java JavaScript Keyword Research Tools MIS Multiple Choice Question (MCQ) Networking Online Earning Online IT Jobs Operating System Oracle Forms and Reports Programming Guide Programming Language SEO Social Networking Sites Software Download Software Engineering System Analysis and Design Top List VB.Net
false
rtl
item
Max6: Solved MCQ on Scripting Documents in JavaScript set-5
Solved MCQ on Scripting Documents in JavaScript set-5
Max6
https://maxs29.blogspot.com/2015/06/solved-mcq-on-scripting-documents-in.html
https://maxs29.blogspot.com/
http://maxs29.blogspot.com/
http://maxs29.blogspot.com/2015/06/solved-mcq-on-scripting-documents-in.html
true
4303790511137642940
UTF-8
لم يتم العثور على اى مواضيع شاهد الكل اقرأ المزيد رد احذف الرد حذف بواسطة الرئيسية صفحات مواضيع شاهد الكل نوصى لك التسميات الارشيف بحث لم يتم العثور على ماتبحث عنه عودة للرئيسية الاحد الاثنين الثلاثاء الاربعاء الخميس الجمعة السبت الاحد الاثنين الثلاثاء الاربعاء الخميس الجمعة السبت يناير فبراير مارس ابريل مايو يونيو يوليو اغسطس سبتمبر اكتوبر نوفمبر ديسمبر يناير فبراير مارس ابريل مايو يونيو يوليو اغسطس سبتمبر اكتوبر نوفمبر ديسمبر just now 1 دقيقة مضت $$1$$ دقيقة مضت 1 hour ago $$1$$ ساعة مضت الامس $$1$$ يوم مضى $$1$$ اسبوع مضى اكثر من 5 اسابيع مضت