Use a timer written in javascript + jquery to regularly modify the article title.
Copy codeThe Code is as follows:
<! DOCTYPE html>
<Html>
<Head>
<Title> TODO supply a title </title>
<Meta charset = "GB2312">
<Meta name = "viewport" content = "width = device-width">
</Head>
<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 = {
Line: 3, // The total number of jokes
TimeSpan: 1850, // time interval (MS)
Interval: '', // timer handle for ease of stopping
ShowLineFlag: 0, // flag,
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>
</Html>