Which two code segments should you add to the webpage?

You develop an HTML5 webpage that contains the following HTML markup:

You have the following requirements:
Retrieve the content for any OPTION elements when the value of the selected attribute equals
selected.
Add the content to a comma separated string.
You need to retrieve the required data.
Which two code segments should you add to the webpage? (Each correct answer presents a
complete solution. Choose two.)

You develop an HTML5 webpage that contains the following HTML markup:

You have the following requirements:
Retrieve the content for any OPTION elements when the value of the selected attribute equals
selected.
Add the content to a comma separated string.
You need to retrieve the required data.
Which two code segments should you add to the webpage? (Each correct answer presents a
complete solution. Choose two.)

A.
Option A

B.
Option B

C.
Option C

D.
Option D

E.
Option E

Explanation:

Note:
* select option:selected
:selected Selector
Description: Selects all elements that are selected.



Leave a Reply 6

Your email address will not be published. Required fields are marked *


d

d

Correct answer: CD

maldivequio

maldivequio

the correct answers are: CD

M

M

I agree with the above posts.
The correct answers are C and D.

M

M

Agree To CD
Because $(loanTypes).test() return all HTML inside select tag

Firefox360

Firefox360

Correct are C and D.
C =>
1: (“select option:selected”) selects all option-elements with an selected attribute(value) in an select-elements.
2: $(this).text() Receives the text from this option element.
Where $(loanTypes).text() returns all of the HTML inside select-element with the id loanTypes.

D =>
1: (“#loanTypes option:selected”) selects all option-elements with an selected attribute(value) in an element with id=”loanTypes”.
2: $(this).text() Receives the text from this option element.
Where $(loanTypes).text() returns all of the HTML inside select-element with the id loanTypes.