DAY27

1.      div的高宽等于浏览器可见区域的高宽,浏览器滚动,div始终覆盖浏览器的整个可见区域

1.<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

2.     <html>

3.     <head>

4.     <metahttp-equiv="Content-Type" content="text/html;charset=UTF-8">

5.     <title>前端试题(html3/4)</title>

6.     <styletype="text/css">

7.     html, body{height:100%;width:100%;margin:0;overflow:hidden;}

8.     #fullDiv {width:100%;height:100%;top:0px;left:0px;position:absolute;background:#eee;border:1pxsolid red;}

9.     #body{width:100%;height:100%;overflow:auto;z-index:999;position:absolute;top:0px;left:0px;}

10.  </style>

11.  </head>

12.  <body>

13.  <inputtype="background:red;position:absolute;left:100px;"></input>

14.  <!--div的高宽等于浏览器可见区域的高宽,浏览器滚动,div始终覆盖浏览器的整个可见区域-->

15.  <!--input type="text"style="background:red;"/-->

16.  <divid="fullDiv"></div>

17.  <div id="body">

18.  <divstyle="height:1000px;border:1px solidblack;background:#ee0;position:absolute;"></div>

19.  </div>

20.  <scripttype="text/javascript">

21.  function getBrowerSize() {

22.      if(document.compatMode =="BackCompat"){

23.          cWidth = document.body.scrollWidth;

24.          cHeight = document.body.scrollHeight;

25.      }

26.      else {

27.          cWidth = document.documentElement.scrollWidth;

28.          cHeight =document.documentElement.scrollHeight;

29.      }

30.      return{width:(cWidth-21)+"px", height:(cHeight - 4)+"px"};

31.  }

32.  var floatDiv =document.getElementByIdx_x_x_x('fullDiv');

33.  alert("width:"+size.width+"    height:"+size.height);

34.  floatDiv.style.height =size.height;

35.  floatDiv.style.width = size.width;

36.  </script>

37.  </body>

38.  </html>

 

2.怎么把这样一个表

year month amount
1991 1 1.1
1991 2 1.2
1991 3 1.3
1991 4 1.4
1992 1 2.1
1992 2 2.2
1992 3 2.3
1992 4 2.4
查成这样一个结果
year m1 m2 m3 m4
1991 1.1 1.2 1.3 1.4
1992 2.1 2.2 2.3 2.4


select year, 
(select amount from aaa m where month=1 and m.year=aaa.year) asm1,
(select amount from aaa m where month=2 and m.year=aaa.year) asm2,
(select amount from aaa m where month=3 and m.year=aaa.year) asm3,
(select amount from aaa m where month=4 and m.year=aaa.year) asm4
from aaa group by year

 

3.抽象类遵循的原则有哪些?

 


(1)abstract关键字只能修饰类和方法,不能修饰字段。

(2)抽象类不能被实例化(无法使用new关键字创建对象实例),只能被继承。

(3)抽象类可以包含属性,方法,构造方法,初始化块,内部类,枚举类,和普通类一样,普通方法一定要实现,变量可以初始化或不初始化但不能初始化后在抽象类中重新赋值或操作该变量(只能在子类中改变该变量)。

(4)抽象类中的抽象方法(加了abstract关键字的方法)不能实现。

(5)含有抽象方法的类必须定义成抽象类。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值