【HTML】 向網頁 中插入圖片以及跑馬燈

本文轉載於:猿2048網站▷【HTML】 向網頁中插入圖片以及跑馬燈javascript

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style type="text/css">
</style>
<title> 歡迎來到個人主頁界面</title>
<!--引入圖片-->
<link href="images/titleIcon.ico" rel="SHORTCUT ICON" />

<!--在標題中實現跑馬燈的效果-->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(function(){
    var title=$("title").html();
    var temptitle=title;
    var length=title.length;
    setInterval(function(){
        temptitle=temptitle.concat(temptitle.charAt(0));
        length=temptitle.length;
        temptitle=temptitle.substring(1,length);
        $("title").html(temptitle);
    }, 500);
    
});
</script>
</head>
<body>

</body>
</html>

 

參考文章:http://blog.csdn.net/zhuyu19911016520/article/details/44080481php

相關文章
相關標籤/搜索