<div class="codetitle"> <span><a style="CURSOR: pointer" data="30651" class="copybut" id="copybut30651" onclick="doCopy('code30651')"><u>复代码码</u></a></span> 代码如下:</div> <div class="codebody" id="code30651"> <br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 전환//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br><html xmlns="http://www.w3.org/ 1999/xhtml"><br><head><br> <title>走马灯</title><br> <script type="text/javascript"><br><br> var 방향 = '왼쪽';<br> var IntervalId = window.setInterval(function () {<br> if (direction == 'right') {<br> var title = document.title;<br> var firstchar = title.charAt (0);<br> var lastchar = title.substring(1, title.length);<br> document.title = lastchar firstchar;<br> }<br> if (방향 == '왼쪽') {<br> var title = document.title;<br> var firstchar = title.charAt(title.length - 1);<br> var lastchar = title.substring(0, title.length - 1);<br> document.title = firstchar lastchar;<br> }<br> }, 2000)<br> </script><br></head><br><body><br></body><br>< ;/html><br> </div>