Which five actions should you perform in sequence?

DRAG DROP
You create a webpage that includes the following HTML markup: (Line numbers are included for reference only.)

You need to ensure that a form cannot be submitted unless the INPUT element contains the word OK.
Which five actions should you perform in sequence? (To answer, move the appropriate actions from
the list of actions to the answer area and arrange them in the correct order.)

DRAG DROP
You create a webpage that includes the following HTML markup: (Line numbers are included for reference only.)

You need to ensure that a form cannot be submitted unless the INPUT element contains the word OK.
Which five actions should you perform in sequence? (To answer, move the appropriate actions from
the list of actions to the answer area and arrange them in the correct order.)

Answer: See the explanation.

Explanation:

Box 1:

Box 2:

Box 3:

Box 4:

Box 5:



Leave a Reply 6

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


Damien

Damien

If the ‘}’ in Box 4 wasn’t there, this would be correct. As it is, the parentheses are unbalanced.

11-4-a

11-4-a

it also says when it contains the word ok, now it seems the value of the input needs to equal the word ok.

Shouldn’t this be : if ($(‘input:first’).val().indexOf(“OK”) !== -1) {…} ?

Syed Ajaz Akhter

Syed Ajaz Akhter

Type OK to validate form.

$(“form”).submit(function() {
if($(“input:first”).val().indexOf(“OK”) != -1) {
console.log(“true”);
}
return false;
});

Syed Ajaz Akhter

Syed Ajaz Akhter

Type OK to validate form.

$(“form”).submit(function() {
if($(“input:first”).val().indexOf(“OK”) != -1) {
return true;
}
return false;
});

Sihle

Sihle

This code will have a error the parentheses are not properly coded