A question about form form scrolling

an empty page form is very long, and a scroll bar appears. When you click submit, the input of a form does not conform to the regular rules. How does the page scroll to this wrong form item?

May.14,2021

does the scroll bar refer to the scroll bar of the outer page or the scroll bar of the form elements in the page?

what exactly does the wrong form item mean?

When you click

, iterate through all the input tags to record the first corner mark of the input that does not conform to the rules. For example, if there are 10 input and the second and fourth corner sign does not match, save the corner label 1 with a variable, and then scroll to this element on the page

.
Menu