Highly adaptive html pages and html pages

Source: Internet
Author: User

Highly adaptive html pages and html pages

The effect of this article is that the background color at the bottom of the page is adaptive to the browser height based on the browser resolution, that is, the background color can be automatically filled.

<Script type = "text/javascript">

Function height_adaptive (){
Var main = $ (document). height ();
Var title = document. getElementById ("login_title"). scrollHeight;
Var body = document. getElementById ("login_body"). scrollHeight;
Var bottom = main-title-body;
$ ("# Login_bottom"). height (bottom );
}
</Script>

 

<BODY id = "userlogin_body" onload = "height_adaptive ()">

<Form method = "post" action = "login. action" name = "frm" id = "frm">
<Div id = "login_title" class = "login_title">
<Span id = "lbl_title"> mindray | OR Digital System </span>
</Div>
<Div id = "login_body" align = "center" class = "login_body">
<Div align = "left" class = "login_head">

</Div>
<Table cellspacing = "10px" style = "padding-top: 278px">
<Tr>
<Td> <input type = "text" id = "userNameTest" name = "tuser. username "onblur =" showpasssword () "style =" background: # FFFFFF url (images/web/user_available.png) no-repeat; "/> </td>
</Tr>
<Tr>
<Td> <input type = "password" id = "usrpwdTest" name = "tuser. password "style =" background: # FFFFFF url (images/web/pwd_available.png) no-repeat; "/> </td>
</Tr>
<Tr>
<Td align = "left"> Onmousedown = "rem_mousedown ()" onmouseup = "rem_mouseup ()">
<Span id = "lbl_remember"> & nbsp; Remember me </span> </td>
</Tr>
</Table>
</Div>
<Div id = "login_bottom" align = "center" class = "login_bottom">
<Br/>
<Button type = "button" id = "btn_login" onclick = "check ()" onmousedown = "login_mousedown ()" onmouseup = "login_mouseup ()"> Log in </button>
</Div>

</FORM>
</BODY>

 

 

 

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.