本文实现的效果是依据浏览器分辨率的不同。页面底端背景色自适应浏览器高度,也就是能够自己主动填充背景色。

<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">

  <img id="logo" alt="" src="./images/web/login_logo.png">

 </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"><img id="remember" alt="" src="images/web/ck_unselect.png" onmouseover="rem_mouseover()" onmouseout="rem_mouseout()"


     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>

html页面高度自适应的更多相关文章

  1. swiper 不同页面高度自适应

    在使用swiper写页面滑动时发现不同页面高度无法自适应,使用autoHeight:true也不起作用 研究了一下发现可以这样设置 .swiper-slide{ overflow: hidden; } ...

  2. 页面高度自适应方法(PC、移动端都适用)

    有个项目移动端的首页需要自适应. 宽度已经自适应了 , 高度也要自适应 ,先总结一下方法,PC端也适用. $(function(){ var h = window.innerHeight; $(&qu ...

  3. iframe父页面和子页面高度自适应

    父页HTML: <iframe  id="mainframe" name="mainframe"  style="width:100%;&quo ...

  4. vue iframe嵌套页面高度自适应 (ios 宽度扩大的bug , ios展示比例问题)

    <template>   <div class="card-index pt-relative">     <div id="wrapper ...

  5. iframe高度自适应

    前两天在网上看到了一道面试题,问iframe高度自适应的问题.发现自己之前几乎没有关注过iframe的问题,所以在这里记录一下. 原题目是: 页面A的域名是:http://www.taobao.com ...

  6. jQuery简单实现iframe的高度根据页面内容自适应的方法(转)

    本文实例讲述了jQuery简单实现iframe的高度根据页面内容自适应的方法.分享给大家供大家参考,具体如下: 方式1: //注意:下面的代码是放在和iframe同一个页面中调用 $("#i ...

  7. 总结iframe高度自适应,自适应子页面高度

      在网上找了很多iframe的高度自适应,发现很多兼容性都不是很好,于是自己总结了一下. 页面html节点上要有 <!DOCTYPE html PUBLIC "-//W3C//DTD ...

  8. div模拟textarea以实现高度自适应实例页面

    作为多行文本域功能来讲,textarea满足了我们大部分的需求.然而,textarea有一个不足就是不能像普通div标签一样高度可以跟随内容自适应.textarea总是很自信地显摆它的滚动条,高度固执 ...

  9. 解决Iframe跨域高度自适应,利用window.postMessage()实现跨域消息传递页面高度(JavaScript)

    在iframe跨域引用高度自适应这块写的js方式都试了不管用,最终使用的是window.postMessage() 跨域获取高度 传递信息 1.首先,在主页面上使用iframe引入子页面:也就是A.h ...

随机推荐

  1. js数组元素的添加和删除

    简单测试例子: var arr = new Array(); arr[0] = "aaa"; arr[1] = "bbb"; arr[2] = "cc ...

  2. Vocabulary & Phrase

    Vocabulary A ANSI    美国国家标准学会,American National Standards Institute的缩写 a couple of    [口语]少数的,几个 a s ...

  3. Python之多进程篇

    Process 创建子进程执行指定的函数 >>> from multiprocessing import Process,current_process >>> & ...

  4. Python之上下文管理

    http://www.cnblogs.com/coser/archive/2013/01/28/2880328.html 上下文管理协议为代码块提供包含初始化和清理操作的上下文环境.即便代码块发生异常 ...

  5. Weblogic之简介

    一.简介(来自百度百科)   WebLogic是美国Oracle公司出品的一个application server,确切的说是一个基于JAVAEE架构的中间件,WebLogic是用于开发.集成.部署和 ...

  6. Vuejs-组件-<slot> 标签分发内容

    资料来自:https://cn.vuejs.org/v2/guide/components.html#具名-Slot 在官方文档的基础上,更加细致的讲解代码. <slot> 标签中的任何内 ...

  7. 异常:This application has no explicit mapping for /error, so you are seeing this as a fallback.

    出现这个异常说明了跳转页面的url无对应的值. 原因1: Application启动类的位置不对.要将Application类放在最外侧,即包含所有子包 原因:spring-boot会自动加载启动类所 ...

  8. head first python菜鸟学习笔记(第六章)

    1. Python提供字典,允许有效组织数据,将数据与名关联,从而实现快速查找,而不是以数字关联. 字典是内置数据结构,允许将数据与键而不是数字关联.这样可以使内存中的数据与实际数据的结构保持一致.? ...

  9. 最耗性能的SQL语句

    设计优化–常见杀手级SQL •SELECT * vsSELECT col1, col2 •ORDER BY RAND() •LIMIT huge_num, offset •SELECT COUNT(* ...

  10. Servlet,JSP 中的中文乱码问题以及解决方案

    问题描述: 在Servlet,JSP 传递数据中,英文无影响,而中文有时候就会出现乱码. 解决方案: 相同的编码: 同一个项目中的每个文件应当设置和保存相同的编码方式,如: html中 <met ...