Closures are functions whose lexical representation includes variables that arent evaluated, meaning that functions are capable of using variables defined outside of the function itself. Using global variables in ECMAScript is a simple exa...
What is the type of the event? This is the only question with a true cross-browser answer: use the type property to read out the type: function doSomething(e) {if (!e) var e = window.event;alert(e.type);} Which HTML element is the target o...
(此漏洞厂商已解决) 缘起 我在公司是做应用安全的,平时主要关注于防。由于工作繁忙,少有时间来尝试攻击别人的系统。但是攻防本一家,做了那么多防治安全问题的解决方案,也该试试手,把防护经验用在攻击中,看看效果如何? 第一个问题,进行什么类型的攻击...
PHP中对日期操作的函数功能强大,下面的代码是PHP对日期加减的类,很不错,有需要的朋友可以用一下。 如何使用这个类呢?请看下面的演示: view plaincopy to clipboardprint? $temptime =time(); echo strftime ( %Hh%M%A%d%b , $temptime ); $date = new D...
CSS中的边界margin的取值也可以为负值,有时候我们不敢相信,这是一个有趣的话题,负值边界会给我们带来更多新奇的创意,让我们的工作更具刺激和挑战。 来看看一个实例吧 首先看一下CSS代码: style type="text/css" #box1,#box2{ float:left; width:200px;...
body {background:url("页面大背景图片地址") repeat scroll!important;} .logo {background:url("题图上背景图片地址") no repeat no scroll!mportant;} .banner {background:url("题图下背景图片地址") no repeat no scroll!mportant;} .menu {background:u...
...
谈到门户,有大有小,大到新浪搜狐、小都乡镇科局,而作为县级网站而言,门户的尺度到底有多大,我们在建设一个县级门户网站时应该如何合理地设置网站频道和栏目呢?下面,结合我做的一个县级网站(习水网http://www.xs0852.com/)谈谈如何设置县级门户网站...