JS代码 浏览器标题跑马灯走动特效 CSS/JS 第1张

直接加到你网站的head标签的前面就可以了,可以设置时间间隔。

<script type="text/jscript">
function sheli() {
	var titleInfo = document.title;
	var firstInfo = titleInfo.charAt(0);
	var lastInfo = titleInfo.substring(1, titleInfo.length);
	document.title = lastInfo + firstInfo;
}
setInterval("sheli()", 1000); //时间间隔
</script>

 

发表回复

后才能评论