Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) The find method lets you get the children of each selected element that match

ID: 3694241 • Letter: 1

Question

1) The find method lets you

get the children of each selected element that match the specified selector

all of the above

get the siblings of each selected element that match the specified selector

get the descendants of each selected element that match the specified selector

2) Which of the following coding sequences can be used to validate the data on a form and submit it to the server?

Within the click event handler of a submit button, validate the data and then issue the submit method of the form if the data is valid or the preventDefault method if it isn’t.

Within the click event handler of a regular button, validate the data and then issue the submit method of the form if the data is valid.

Within the click event handler of a regular button, validate the data and then issue the submit method of the form if the data is valid or the preventDefault method if it isn’t.

Within the click event handler of a submit button, validate the data and then issue the submit method of the form if the data is valid

a.

get the children of each selected element that match the specified selector

b.

all of the above

c.

get the siblings of each selected element that match the specified selector

d.

get the descendants of each selected element that match the specified selector

Explanation / Answer

Answer:-

1. answer is d) get the descendants of each selected element that match the specified selector.

  find method gets the descendent of each element in the current set of matched element.

2. answer is a) Within the click event handler of a submit button, validate the data and then issue the submit method of the form if the data is valid or the preventDefault method if it isn’t.

the form validation should do within a button of tye submit.if it validate successfully,the form will be sent to server. otherwise it prevent the submit button from submitting the form using prevent default method.