<ptml> <pead> <title> Web typing effect with linked news title </title> <meta http-equiv= "Content-type" content= " text/html; charset=gb2312 "> <style type=" text/css "> Body{font-size:14px;font-weight:bold;} </style> </pead> <body> Latest content: <script language= "JavaScript" > <!--var newstime = 2000; Stay time of each news var texttime = 50; News title text appears waiting time, the smaller the faster the var newsi = 0; var txti = 0; var Txttimer; var Newstimer; var newstitle = new Array (); News title var newshref = new Array (); News link Newstitle[0] = "about the relevant description of the site"; Newshref[0] = "Http://linkweb.cn/Js/ShowNews.asp?ID=1"; NEWSTITLE[1] = "The use of the Control Panel of the site introduction"; NEWSHREF[1] = "http://linkweb.cn/Js/ShowNews.asp?ID=2"; NEWSTITLE[2] = "added part of the tutorial article to enrich the content"; NEWSHREF[2] = "http://linkweb.cn/Js/ShowNews.asp?ID=3"; NEWSTITLE[3] = "Complete the change of the message board"; NEWSHREF[3] = "http://linkweb.cn/Js/ShowNews.asp?ID=4"; NEWSTITLE[4] = "Thousands of exquisite effects continue to add"; NEWSHREF[4] = "http://linkweb.cn/Js/ShowNews.asp?ID=5"; FunctIon Shownew () {//code by Haiwa @2005-10-21 www.51windows.net var endstr = "_" Hwnewstr = Newstitle[newsi] ; Newslink = Newshref[newsi]; if (txti== (hwnewstr.length-1)) {endstr= "";} if (txti>=hwnewstr.length) {clearinterval (Txttimer); Clearinterval (Newstimer); newsi++; if (newsi>=newstitle.length) {newsi = 0} Newstimer = setinterval ("Shownew ()", newstime); Txti = 0; Return } clearinterval (Txttimer); document.getElementById ("Hotnews"). Href=newslink; document.getElementById ("Hotnews"). InnerHTML = hwnewstr.substring (0,txti+1) +endstr; txti++; Txttimer = SetInterval ("Shownew ()", texttime); } shownew (); --> </SCRIPT> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]