<script language="javascript">
function scrollTo() {
//已让一个隐藏div做变量保存
var strs="<h3>CCC</h3><li> <a href='chat1.htm'><img src='images/head (3).jpg' class='chead' /><div class='fcon'><h4>CCC fan</h4><span class='clikt'>Following</span> </div></a> </li><li> <a href='chat1.htm'><img src='images/head (6).jpg' class='chead' /><div class='fcon'><h4>CCC johy</h4><span class='clikt'>Colleagues</span> </div></a> </li><li> <a href='chat1.htm'><img src='images/head (7).jpg' class='chead' /><div class='fcon'><h4>CCC sky</h4><span class='clikt'>Colleagues</span> </div></a> </li>";
//控件做变量
var str=document.getElementById("bug").innerHTML;
var str1=str.replace(/(^[\s]*)|([\s]*$)/g, "");
var str2=str1.substring(4,5);//当前字母
var str3=String.fromCharCode(str2.charCodeAt(0)+1);//下个字母
//滚动条
var loading = document.getElementById("loading");
//要插入的列表
var listUL=document.getElementById("listUL");
//一些高度
var scroller = document.getElementById("myList");
var nDivHight = scroller.offsetHeight;
var nScrollHight = scroller.scrollHeight;//滚动距离总长(注意不是滚动条的长度)
var nScrollTop = scroller.scrollTop;//滚动到的当前位置
//是否到底了,并且字母只排到'Z'=90
if (parseInt(nScrollTop) + parseInt(nDivHight) == nScrollHight&& (str2.charCodeAt(0)+1)<90) {
if(loading.style.display=="none"){
loading.style.display=""
}
var timer_alert = setTimeout(function() {
if(loading.style.display==""){
loading.style.display="none"; // 隐藏
//alert("滚动条到底了,我要消失了");
str1=str1.replace("<h3>"+str2+"</h3>","<h3>"+str3+"</h3>");
str1=str1.replace(str2+str2+str2,str3+str3+str3);
str1=str1.replace(str2+str2+str2,str3+str3+str3);
str1=str1.replace(str2+str2+str2,str3+str3+str3);
document.getElementById("bug").innerHTML=str1;
listUL.insertAdjacentHTML("beforeEnd",str1);
}
}, 2000);//加载时间在这里改
}
var obj = document.getElementById("txt");
obj.innerHTML=nDivHight+"-"+nScrollHight+"-"+nScrollTop;
}
</script>