【www.gdgbn.com--js教程】
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.onload = externalLinks;
function selectTag(showContent,selfObj){
var tag = document.getElementById("tags").getElementsByTagName("a");
var taglength = tag.length;
for(i=0; i
}
selfObj.className = "focu";
for(i=0; j=document.getElementById("baidu"+i); i++){
j.style.display = "none";
}
document.getElementById(showContent).style.display = "block";
}
function addBookmark(title,url) {
if (window.sidebar) {
window.sidebar.addPanel(title, url,"");
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}