Is the length of the password box different from that of the text box on the JSP page?

Source: Internet
Author: User

<Body>

<Formaction = "" method = "Post" name = "loginform">

<Table> <tr> <TD> Username
: </TD> <inputtype = "text" name = "username" size = "25"/> <br/> </TD> </tr> <tr> <TD> Password
: </TD> <inputtype = "password" name = "password" size = "25"/> <br/> </TD> </tr> <tr> <tdwidth = "30%"> <inputtype = "button" name = "but_loginsubmit" onclick = "login () "value = 'login'/> </TD> </tr> </table> </form> </body>

On the surface, the above User Name text box and Password box should be of the same size, but the actual display result is not so, but if we use style to control its properties, the results will be different:

<Body> <form action = "" method = "Post" name = "loginform"> <Table> <tr> <TD> Username: </TD> <input type = "text" name = "username" style = "width: 200px "/> <br/> </TD> </tr> <TD> password: </TD> <input type = "password" name = "password" style = "width: 200px "/> <br/> </TD> </tr> <TD width =" 30% "> <input type =" button "name =" but_loginsubmit "onclick = "login () "value = 'login'/> </TD> </tr> </table> </form> </body>

Therefore, we can use style = "width: 200px" to unify the length.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.