Advanced Application Forms

Hidden Field syntax:

  <input type="hidden" value="1" name="id">

  Translation: type = "hidden" type is hidden;

Read-only and disabling syntax:

  <input type="text" name="user" value="小明" readonly/>

  Translation: readonly: read-only;

  <input   type="button" disabled value="提交"/>

  Translation: disabled: Disable;

Primary verification form:

   The benefits: 1 to reduce the service pressure;

      2. ensure the feasibility and security of data;

  Form validation primary benefits:

      1.placeholder:

            1) A type of prompt text box provided .input (hint)

            . 2) can describe what a user input text box look content;

            3). Prompt is displayed by default when typing text box automatically disappear

            4) tags for input: text, search, url, email, and other types of password

      Do not look at the top say more advanced, actually. . . as follows:

      <the INPUT of the type = "Search" name = "sousuo" placeholder (text box to enter the content presentation) = "Please enter a keyword to search for" />

        2.required:

            1) The provisions of the text box to fill in the content can not be empty, otherwise it does not allow users to submit the form

            2) Applicable input almost all labels

        <input type="text" name="username" required/(必填项)>

         3.pattern:

            User input must conform to the rules of regular expressions referred to, or can not submit the form

      <INPUT type = "text" name = "Tel" required pattern (validation rules, regular expressions) = "^. 1 [358] \ {D}. 9" />

   

Guess you like

Origin www.cnblogs.com/a973692898/p/11613330.html