PHP Practice-javascript,jquey Making page transitions

Source: Internet
Author: User

PHP Practice-javascript,jquey making page Transitions
I. Focus: CSS style, JS Dom value, JS event

Jquey Introduction Address
<script type= "Text/javascript" src= "Https://cdn.bootcss.com/jquery/2.2.4/jquery.js" ></script>

two. JS native code
<! DOCTYPE html>
<meta charset= "UTF-8";
<title> Practice Questions- tab </TITLE>
<style type= "text/css";
/ CSS style authoring /
*{margin:0;padding:0;font:normal 12px "Microsoft Jas Black"; color: #000000;}
#tabs {width:290px; height:150px; padding:5px; margin:20px;}
#tabs ul{list-style:none; display:block; height:30px; line-height:30px;}
#tabs ul li{
Float:left; width:60px; height:28px; line-height:28px; text-align:center;
display:inline-block;margin:0px 3px; border:1px solid #aaa; border-bottom:none;
Cursor:pointer; background: #fff; list-style:none;
}
#tabs ul li.on{border-top:2px solid saddlebrown; border-bottom:2px solid #fff;}
#tabs div{
height:120px; line-height:25px; border:1px solid #336699; border-top:2px SaddleBrown solid;padding : 5px;}
. Hide{display:none;}

</style><script type="text/javascript" src="jquery-1.10.2.min.js">// JS实现选项卡切换window.onload = function() {    var oTab = document.getElementById("tabs");    var oUl = oTab.getElementsByTagName("ul")[0];    var oLis = oUl.getElementsByTagName("li");    var oDivs = oTab.getElementsByTagName("div");    for(var i=0;i<oLis.length;i++) {          oLis[i].index = i;    //    var text = oLis[i].getAttribute("index");    //    document.write(text+"<br>");    //    console.log(oLis[i].innerHTML);        oLis[i].onclick = function() {            for(var n=0;n<oLis.length;n++) {                oLis[n].className = "";                oDivs[n].className = "hide";            }        this.className = "on";        oDivs[this.index].className = "";        }    }}

<body>

    • xxx
    • Furniture
    • Secondary
2.75 million purchase Changping Neighborhood Triathlon Total Price 200,000 buy a home
2 million within the five rings of the three 1.4 million home to the east third ring
Beijing 0 First pay property 530,000 buy East 5 ring 50 Ping
Beijing real estate straight down 5000 Citic House Park house Wang existing
40 Flat rental house big makeover beauty girl's mixed up small nest
Classic Fresh Jean Home 90 flat old room glow Renaissance
New Chinese cool color warmth 66 flat contrast lively home
Tiles are like choosing a wife. Design of the flue in the bathroom
Tongzhou Luxury 3 2,600,002 ring scarce 2 250w Dump
West 3-Ring permeability 2 29,001,300,002-bedroom Limited
Yellow Cheng Gen Primary School District only 2,600,121 Ping 700,000 throw!
Exclusive villa 2.8 million Suzhou Bridge 2 special price 2.48 million
* * three. jquery notation * * <title>Practice Questions-Tabs</title>
    • xxx
    • Furniture
    • Secondary
2.75 million purchase Changping Neighborhood Triathlon Total Price 200,000 buy a home
2 million within the five rings of the three 1.4 million home to the east third ring
Beijing 0 First pay property 530,000 buy East 5 ring 50 Ping
Beijing real estate straight down 5000 Citic House Park house Wang existing
40 Flat rental house big makeover beauty girl's mixed up small nest
Classic Fresh Jean Home 90 flat old room glow Renaissance
New Chinese cool color warmth 66 flat contrast lively home
Tiles are like choosing a wife. Design of the flue in the bathroom
Tongzhou Luxury 3 2,600,002 ring scarce 2 250w Dump
West 3-Ring permeability 2 29,001,300,002-bedroom Limited
Yellow Cheng Gen Primary School District only 2,600,121 Ping 700,000 throw!
Exclusive villa 2.8 million Suzhou Bridge 2 special price 2.48 million
* * Four. Page Output * * By contrast, jquery is more concise! [] (http://i2.51cto.com/images/blog/201807/01/7ce8dee142e75503ad791c485cc69efc.jpg?x-oss-process=image/ watermark,size_16,text_qduxq1rp5y2a5a6i,color_ffffff,t_100,g_se,x_10,y_10,shadow_90,type_zmfuz3pozw5nagvpdgk=)

PHP Practice-javascript,jquey Making page transitions

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.