首页 > 代码库 > 【HTML】 向网页<Title></Title>中插入图片以及跑马灯
【HTML】 向网页<Title></Title>中插入图片以及跑马灯
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style type="text/css">
</style>
<title> 欢迎来到我的主页界面</title>
<!--引入图片-->
<link href="http://www.mamicode.com/images/titleIcon.ico" rel="SHORTCUT ICON" />
<!--在标题中实现跑马灯的效果-->
<script type="text/javascript" src="http://www.mamicode.com/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>
【HTML】 向网页<Title></Title>中插入图片以及跑马灯