Use a timer written by Javascript+jquery to change the title of the article regularly.
Copy Code code as follows:
<! DOCTYPE html>
<title>todo supply a title</title>
<meta charset= "GB2312" >
<meta name= "viewport" content= "Width=device-width" >
<body>
<div>
<ul id= "Joketitle" >
<li class= "line" >test line one</li>
<li class= "line" >test line two</li>
<li class= "line" >test line three</li>
</ul>
</div>
<script type= "Text/javascript" src= "Ie/js/jquery-1.9.0.min.js" ></script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
var changejoketitle = {
Total number of line:3,//Jokes
timespan:1850,//time interval (ms)
Interval: ',//timer handle to stop
showlineflag:0,//logo,
Change:function () {
var currentline = (++changejoketitle.showlineflag)% (changejoketitle.line);
$ (' #jokeTitle li:eq (' +currentline+ ') '). Show ();
$ (' #jokeTitle li:not (: eq (' +currentline+ ') '). Hide ();
},
Run:function () {
$ (' #jokeTitle li:eq (0) '). Show ();
$ (' #jokeTitle li:not (: eq (0)) '). Hide ();
Changejoketitle.interval = SetInterval (Changejoketitle.change, Changejoketitle.timespan);
}
};
Changejoketitle.run ();
});
</script>
</body>