【编者按】网学网Ajax频道为大家收集整理了“Ajax标签导航效果(仿网易首页)“提供大家参考,希望对大家有所帮助!
根据yaohaixiao的Ajax标签导航效果:http://www.blueidea.com/tech/web/2006/4144.
asp改进。
效果:
http://www.lorlo.com/tab.html
主要是改了JS:
复制代码 代码如下:
<!--
function getObject(objectId) {
if(document.getElementById && document.getElementById(objectId)) {
// W3C DOM
return document.getElementById(objectId);
}
else if (document.all && document.all(objectId)) {
// MSIE 4 DOM
return document.all(objectId);
}
else if (document.layers && document.layers[objectId]) {
// NN 4 DOM.. note: this won''t find nested layers
return document.layers[objectId];
}
else {
return false;
}
}
var responsecont;
var xmlHttp;
var requestType;
var newsstring;
var ajccache=new Object();//缓存已访问的数据页面
var url;
var MouseDelayTime=150;//鼠标感应延迟
var waitInterval;
function CreateXMLHttpRequest(){
// Initialize Mozilla XMLHttpRequest object
if (window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest();
}
// Initialize for IE/Windows ActiveX version
else if (window.ActiveXObject) {
try{
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP.3.0");
}
catch (e){
try{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){newsstring = "<div class=''loading''>Loading rquest content fail, Please try it again latter...</div>";}
}
}
}
function getnews(tagid,x){
url = "tab/"+tagid+''_''+x+''.html'';
// var loadstatustext="<div cl