12 2012 档案

摘要:1.screenX screenY 表示窗口相对于屏幕左上角的位置。注意IE不支持此属性。 只读属性。 IE 中的实现用screenLeft screenTop (等于screenY + 工具栏+菜单栏+地址栏的像素) 2.innerWidth innerHeight窗口中文档显示区域的宽度,不包括边框和滚动条,该属性可读可写。 IE8之前的浏览器不支持该属性,IE中body... 阅读全文
posted @ 2012-12-19 14:40 phpzxh 阅读(5193) 评论(1) 推荐(2)
摘要:<?php//解释器模式abstract class Expression { abstract function interpreter($str);}class ExpressionNum extends Expression { function interpreter($str) { switch($str) { case '0' : return '零... 阅读全文
posted @ 2012-12-13 15:07 phpzxh 阅读(382) 评论(0) 推荐(0)
摘要:<?php//备忘录模式class GameRole { private $attack,$defence,$lifetime; function __construct() { $this->getStatus(); } function getStatus() { $this->attack = 100; $this->defence = 100; ... 阅读全文
posted @ 2012-12-05 16:20 phpzxh 阅读(584) 评论(0) 推荐(0)
摘要:<?phpinterface Subject { function attach($obj); function detach($name); function notify();}class Teacher implements Subject { private $attachArr = array(); function __construct() { } function attac... 阅读全文
posted @ 2012-12-05 16:19 phpzxh 阅读(1046) 评论(0) 推荐(0)