HREF.JS
上传用户:szhf331
上传日期:2022-06-22
资源大小:1032k
文件大小:1k
- //add event function
- function addEvent(obj, evType, fn){
- if (obj.addEventListener){
- obj.addEventListener(evType, fn, true);
- return true;
- } else if (obj.attachEvent){
- var r = obj.attachEvent("on"+evType, fn);
- return r;
- } else {
- return false;
- }
- }
- // Find all this. elements and add an onfocus attribte and value
- function hideFocusBorders(){
- var theahrefs = document.getElementsByTagName("a");
- if (!theahrefs){return;}
- for(var x=0;x!=theahrefs.length;x++){
- //theahrefs[x].onfocus = function stopthis.Focus(){this.hideFocus=true;};
- }
- }
- //event added using the addEvent() function above
- addEvent(window, 'load', hideFocusBorders);