- 博客(8)
- 资源 (1)
- 收藏
- 关注
转载 JavaScript body height
网页可见区域宽:document.body.clientWidth; 网页可见区域高:document.body.clientHeight; 网页可见区域高:document.body.offsetWeight; 网页可见区域高:document.body.offsetHeight; 网页正文全文宽:document.body.scrollWidth;
2012-10-25 13:39:35 1616
原创 模仿jquery选择器 $('#id') $('.className')
function $(ss){ var start=ss.substring(0,1); var obj=null; switch(start){ case '#': obj=document.getElementById(ss.substring(1)); break; case '.': obj=new Array(); var all=document.
2012-10-24 17:41:29 3116
原创 模拟Jquery addClass() removeClass() 并应用于隔行变色 高亮当前行
function addClass(obj,className){ if(obj.getAttribute('class')){ obj.setAttribute('class',obj.getAttribute('class')+' '+className); }else{ obj.setAttribute('class',className); }}function remo
2012-10-24 17:16:32 1539
原创 Javascript 高亮 当前行
function highlighttr(color){ var trs=document.getElementsByTagName('tr'); for(var x=0;x<trs.length;x++){ var tr=trs[x]; var oldColor=tr.style.backgroundColor; tr.onmouseover=function(){ thi
2012-10-24 13:08:49 774
原创 javascript table 隔行变色
从此再也不用为了隔行变色而引入jquery了function changeTableColor(oddColor,evenColor){ var tables=document.getElementsByTagName('table'); for(var i=0;i<tables.length;i++){ var table=tables[i]; var childs=table.
2012-10-24 12:37:09 675
翻译 Accesskey standards
One of my goals for Clagnut is to make it accessible beyond good alttags and valid code. It currently passes WCAG 1.0 Priority 1 and Section 508. To achieve this, a skip navigation link (skip
2012-10-23 15:30:05 503
转载 HTMl DOM中 nodevalue nodeType等介绍
nodeName、nodeValue 以及 nodeType 包含有关于节点的信息。nodeName 属性含有某个节点的名称。 元素节点的 nodeName 是标签名称 属性节点的 nodeName 是属性名称 文本节点的 nodeName 永远是 #text 文档节点的 nodeName 永远是 #document 注释:nodeName 所包含的 XML 元
2012-10-22 13:25:14 1882
转载 JavaScript Window.onload addLoadEvent
function addLoadEvent(func){ var oldonload=window.onload; if(typeof window.onload != 'function'){//如果还没有绑定任何函数 window.onload = func; }else{ window.onload = function(){ oldonload(); func()
2012-10-22 12:49:42 558
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人