
JavaScript + CSS
love_beibei
不是炫耀, 只是证明
展开
-
js 设置滚动条的位置
window.onload = function(){ var aWidth = window.screen.availWidth; // 获取客户端分辨率的宽度 var aHeight = window.screen.availHeight; // 获取客户端分辨率的高度 var sWidth = document.body.scrollWidth; // 获原创 2009-07-20 10:35:00 · 16053 阅读 · 4 评论 -
40种页面设计技巧
1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键 no 可用于Table2. 取消选取、防止复制3. onpaste="return false" 不准粘贴4. oncopy="return false;" oncut="return false;" 防止复制5. IE地址栏前换成自己的原创 2009-11-03 12:22:00 · 821 阅读 · 0 评论 -
Javascript获取鼠标的位置, 获取Html控件的绝对位置的两种方法
滑鼠游标相对于目前区块边框的距离event.offsetX、event.offsetY 滑鼠游标相对于目前浏览器边框的距离event.clientX、event.clientY、event.x、event.y 滑鼠游标相对于目前萤幕边框的距离event.screenX、event.screenY 获取Html控件的绝对位置的两种方法function getA原创 2009-11-02 12:00:00 · 5377 阅读 · 1 评论 -
JS鼠标事件大全
js鼠标事件大全2008年01月14日 星期一 08:54一般事件 事件 浏览器支持 描述 onClick IE3|N2|O3 鼠标点击事件,多用在某个对象控制的范围内的鼠标点击 onDblClick IE4|N4|O 鼠标双击事件 onMouseDown IE4|N4|O 鼠标上的按钮被按下了 onMouseUp IE4|N4|O 鼠标按下后,松开时激发的事件 onMouseOver原创 2009-10-29 17:32:00 · 496 阅读 · 0 评论 -
图片绝对定位
body{ background-image: url(/i/eg_bg_03.gif);background-repeat: no-repeat;background-attachment:fixed;background-position: -9px -9px;}注释:为了在 Mozilla 中实现此效果,background-attachment 属性必须设置为 "fixed"。原创 2009-09-25 17:41:00 · 1359 阅读 · 0 评论 -
js 是实现网页日期控件
var calenderMonth = 0; function JCalendar(year, month, date) { var _date = arguments.length == 0 ? new Date() : new Date(year, month - 1, date); this.year = _date.getFullYear(); this.month = _date.get原创 2009-07-03 14:18:00 · 1020 阅读 · 0 评论 -
js 是实现顶部弹出广告
var tm = 500;var h = 0;function countAdd(){ if(tm > 0) { tm = tm - 1; h = h + 5; } else return; if(h > 280) return; document.getElementById("topAd").style.display = ""; document.getElementById("to原创 2009-07-03 14:23:00 · 1843 阅读 · 0 评论 -
兼容IE和FF的js脚本写法
兼容IE和FF的js脚本写法原创 2010-07-05 16:23:00 · 1223 阅读 · 0 评论