The site has this switching effect _javascript

Source: Internet
Author: User

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title> News Switching Technology </title>
<style type= "Text/css" >
<!--
body {text-align:center margin:0; padding:0 background: #FFF; font-size:12px; color: #000;}
div,form,img,ul,ol,li,dl,dt,dd {margin:0; padding:0; border:0;}
H1,h2,h3,h4,h5,h6 {margin:0; padding:0;}
table,td,tr,th{font-size:12px;}
a:link {color: #000; text-decoration:none;}
a:visited {color: #83006f; text-decoration:none;}
a:hover {color: #c00; text-decoration:underline;}
a:active {color: #000;}
. focuspic{margin:0 auto; width:244px;}
. focuspic. pic{margin:0 auto; width:240px height:180px; padding:2px 0 0;
. focuspic. adpic{margin:0 auto 5px; width:240px height:29px; Overflow:hidden;background:url (http://tech.163.com/ Newimg/adpic.gif);}
. focuspic. adpic. Text{float:right padding:9px 4px 0 0; width:140px;
. focuspic. Adpic. Text a{color: #1f3a87;}
. focuspic. Adpic. Text a:hover{color: #bc2931;}
. Focuspic h2{float:left width:232px;padding:4px 0 3px 12px; font-size:14px; text-align:left;}
. focuspic p{float:left; width:226px;line-height:160%; margin:0; text-align:left;padding:0 0 10px 12px;}
. Focuspic p img {margin:0px 0 2px;}
. focuspic. more{margin:0 Auto; width:240px;}
. focuspic. textnum{float:right; margin:0 8px 0 0;padding:0 0 4px;}
. focuspic. textnum. Text{float:left font-weight:bold; padding:7px 6px 0 0; color: #666;
. focuspic. Textnum. num{float:left; width:113px; height:19px;}
. focuspic. Textnum. bg1{Background:url (yun_qi_img/num1.gif);
. focuspic. Textnum. bg2{Background:url (yun_qi_img/num2.gif);
. focuspic. Textnum. bg3{Background:url (yun_qi_img/num3.gif);
. focuspic. Textnum. bg4{Background:url (yun_qi_img/num4.gif);
. focuspic. textnum. Num ul{float:left; width:113px;
. focuspic. textnum. num li{float:left; width:28px; font-weight:bold;display:block; color: #fff; List-style-type: None padding:6px 0 0;}
. focuspic. textnum. Num li a{color: #fff; padding:0 5px; }
. focuspic. textnum. Num li a:visited{color: #fff;
. focuspic. textnum. Num li a:hover{color: #ff0;

-->
</style>

<body>
<script language= "JavaScript" type= "Text/javascript" >
var nn;
Nn=1;
SetTimeout (' change_img () ', 6000);
function change_img ()
{
if (nn>4) nn=1
SetTimeout (' SetFocus1 (' +nn+ ') ', 6000);
nn++;
Tt=settimeout (' change_img () ', 6000);
}
function SetFocus1 (i)
{
SelectLayer1 (i);
}
function SelectLayer1 (i)
{
Switch (i)
{
Case 1:
document.getElementById ("FocusPic1"). style.display= "Block";
document.getElementById ("FocusPic2"). style.display= "None";
document.getElementById ("FocusPic3"). style.display= "None";
document.getElementById ("FocusPic4"). style.display= "None";
document.getElementById ("Focuspic1nav"). style.display= "Block";
document.getElementById ("Focuspic2nav"). style.display= "None";
document.getElementById ("Focuspic3nav"). style.display= "None";
document.getElementById ("Focuspic4nav"). style.display= "None";
Break
Case 2:
document.getElementById ("FocusPic1"). style.display= "None";
document.getElementById ("FocusPic2"). style.display= "Block";
document.getElementById ("FocusPic3"). style.display= "None";
document.getElementById ("FocusPic4"). style.display= "None";
document.getElementById ("Focuspic1nav"). style.display= "None";
document.getElementById ("Focuspic2nav"). style.display= "Block";
document.getElementById ("Focuspic3nav"). style.display= "None";
document.getElementById ("Focuspic4nav"). style.display= "None";
Break
Case 3:
document.getElementById ("FocusPic1"). style.display= "None";
document.getElementById ("FocusPic2"). style.display= "None";
document.getElementById ("FocusPic3"). style.display= "Block";
document.getElementById ("FocusPic4"). style.display= "None";
document.getElementById ("Focuspic1nav"). style.display= "None";
document.getElementById ("Focuspic2nav"). style.display= "None";
document.getElementById ("Focuspic3nav"). style.display= "Block";
document.getElementById ("Focuspic4nav"). style.display= "None";
Break
Case 4:
document.getElementById ("FocusPic1"). style.display= "None";
document.getElementById ("FocusPic2"). style.display= "None";
document.getElementById ("FocusPic3"). style.display= "None";
document.getElementById ("FocusPic4"). style.display= "Block";
document.getElementById ("Focuspic1nav"). style.display= "None";
document.getElementById ("Focuspic2nav"). style.display= "None";
document.getElementById ("Focuspic3nav"). style.display= "None";
document.getElementById ("Focuspic4nav"). style.display= "Block";
Break
}
}
</script>
<div class= "Focuspic" >
<div id= "FocusPic1" style= "Display:block;" >
<div class= "pic" > <a href= "http://tech.163.com/special/000915SN/soft2005.html" ></a> </div>
<p> after everyone's enthusiastic vote and our painstaking finishing, NetEase College 2005 annual software selection results are finally released. Click Enter to view ... <a href= "http://tech.163.com/special/ 000915sn/soft2005.html "class=" cdred "> Detail </a></p>
</div>
<div id= "FocusPic2" style= "Display:none;" >
<div class= "pic" > <a href= "http://tech.163.com/discover/" ></a> </div>
The behavior of <p> social animals subverts What we normally think of as the "jungle Law" in the animal world, where animals are not selfish, not all of the jungle. <a href= "http://tech.163.com/discover/" class= " Cdred "> Details </a></p>
</div>
<div id= "focusPic3" style= "Display:none;" >
<div class= "pic" > <a href= "http://tech.163.com/special/00091MNJ/itobserve015.html" ></a> </div>
<p> recently the state decided: "The algorithm will be published to other domestic and foreign enterprises." It turns out that China's WAPI standard is not a trade conspiracy. <a href= "http://tech.163.com/special/00091MNJ/" Itobserve015.html "class=" cdred "> Detail </a></p>
</div>
<div id= "FocusPic4" style= "Display:none;" >
<div class= "pic" > <a href= "http://tech.163.com/special/00091OSI/horizons.html" ></a> </div>
<p> NASA will launch a new Horizon probe in Beijing 18th 2:24 A.M. to visit the only planet that has not yet been detected-Pluto. <a href= "http://tech.163.com/special/00091OSI/" Horizons.html "class=" cdred "> Detail </a></p>
</div>
<div class= "More" >
<div class= "Textnum" >
<div class= "text" >> more head chart News </div>
<div class= "num bg1" id= "Focuspic1nav" style= "Display:block"; >
<ul>
<li>1</li>
<li><a href= "Javascript:setfocus1 (2);" target= "_self" >2</a></li>
<li><a href= "Javascript:setfocus1 (3);" target= "_self" >3</a></li>
<li><a href= "Javascript:setfocus1 (4);" target= "_self" >4</a></li>
</ul>
</div>
<div class= "num bg2" id= "Focuspic2nav" style= "Display:none"; >
<ul>
<li><a href= "Javascript:setfocus1 (1);" target= "_self" >1</a></li>
<li>2</li>
<li><a href= "Javascript:setfocus1 (3);" target= "_self" >3</a></li>
<li><a href= "Javascript:setfocus1 (4);" target= "_self" >4</a></li>
</ul>
</div>
<div class= "num bg3" id= "Focuspic3nav" style= "Display:none"; >
<ul>
<li><a href= "Javascript:setfocus1 (1);" target= "_self" >1</a></li>
<li><a href= "Javascript:setfocus1 (2);" target= "_self" >2</a></li>
<li>3</li>
<li><a href= "Javascript:setfocus1 (4);" target= "_self" >4</a></li>
</ul>
</div>
<div class= "num Bg4" id= "Focuspic4nav" style= "Display:none"; >
<ul>
<li><a href= "Javascript:setfocus1 (1);" target= "_self" >1</a></li>
<li><a href= "Javascript:setfocus1 (2);" target= "_self" >2</a></li>
<li><a href= "Javascript:setfocus1 (3);" target= "_self" >3</a></li>
<li>4</li>
</ul>
</div>
</div>
</div>
</div>
</body>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.