Which CSS selectors should you use?

DRAG DROP
You are developing a web page that includes the following HTML.

You need to ensure that the email element is enabled only if the user selects the IT Support
check box.
Which CSS selectors should you use? (To answer, drag the appropriate selector to the
correct location. Each selector may be used once, more than once, or not at all. You may
need to drag the split bar between panes or scroll to view content.)

DRAG DROP
You are developing a web page that includes the following HTML.

You need to ensure that the email element is enabled only if the user selects the IT Support
check box.
Which CSS selectors should you use? (To answer, drag the appropriate selector to the
correct location. Each selector may be used once, more than once, or not at all. You may
need to drag the split bar between panes or scroll to view content.)

Answer:



Leave a Reply 6

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

one × three =


Aires

Aires

The answer is incorrect, the questions clearly states that when the user clicks on “IT Support” the element must be enable and only when he clicks. the first option is disable = true, else{isable = false}. I tested the code.

HJ

HJ

You are incorrect:
“You need to ensure that the email element is enabled only if the user selects the IT Support
check box.”

So if the use check the box the email must be editable (disable=false) so the solution is correct.

Test it:

function enable(e){
if(document.getElementById){
if(document.getElementById(“it”).checked){
document.getElementById(“email”).disabled = false;
}
else{document.getElementById(“email”).disabled = true;}
}
}

input:disabled{
background-color:#e0e0e0;
}

HJ

HJ

It did not post all my code here a 2e try

function enable(e){
if(document.getElementById){
if(document.getElementById(“it”).checked){
document.getElementById(“email”).disabled = false;
}
else{document.getElementById(“email”).disabled = true;}
}
}

input:disabled{
background-color:#e0e0e0;
}

HJ

HJ

text/javascript
function enable(e){
if(document.getElementById){
if(document.getElementById(“it”).checked){
document.getElementById(“email”).disabled = false;
}
else{document.getElementById(“email”).disabled = true;}
}
}

style
input:disabled{
background-color:#e0e0e0;
}
body
input name=”it” type=”checkbox” value=”it” id=”it” onclick=”enable();”
input type=”email” id=”email” name=”email” disabled

PinnaWarner

PinnaWarner

input:disabled {
background-color:#e0e0e0
}

IT Support

Your eMail

function enable(e){
if(document.getElementById){
if(document.getElementById(‘choc’).checked){
document.getElementById(‘eMail’).disabled = false;
} else {
document.getElementById(‘eMail’).disabled = true;
}
}
}

WORK