var tagName = select.replace(/(.|#|:)[a-z0-9_-]+/i, ”);
for(var i = 0; i < elements.length; i++){
result = tagName ? elements[i].all.tags(tagName) : elements[i].all;
for(var j = 0; j < result.length; j++){
node = result[j];
if((identify && node.id != identify[1]) || (classname && !(new RegExp(‘b’ + classname[1] + ‘b’).exec(node.className)))) continue;
nodes[nodes.length] = node;
};
};
return nodes;
};
</script>
使用方法:
复制代码
body{behavior:url(css/csshover.htc);}
注意
在引用 csshover.htc 时,不管你是在 css 文件里面引用 htc 文件,还是 html 里面引用 htc 文件,都是 html 文件去找 htc 的路径。也就是说路径一定要相对根目录或用绝对路径。










