Source code of the 126 mail tab that can be used for multiple times

Source: Internet
Author: User

There are many tabs in our forum, but the same page may not be used many times. I can have multiple tabs in the same page. A background image is used.


The background image has been uploaded. I can help you back it up. It took me a few hours yesterday.
I finally adapted to Ie and ff browsers. Now all the code is made public to everyone. I hope you will like it. Use it now.

Similar to the following results.

Screen. width * 0.7) {this. resized = true; this. width = screen. width * 0.7; this. style. cursor = 'hand'; this. alt = 'click here to open new window \ nCTRL + Mouse wheel to zoom in/out';} "onclick =" if (! This. resized) {return true;} else {window. open (this. src);} "alt =" "src =" http://www.bkjia.com/uploads/allimg/131015/213251K36-0.gif "onload =" if (this. width> screen. width * 0.7) {this. resized = true; this. width = screen. width * 0.7; this. alt = 'click here to open new window \ nCTRL + Mouse wheel to zoom in/out';} "border = 0>

When you add a div block
<Div id = "Tab2">
<Div class = "Menubox">
<Ul>
<Li id = "two1" onclick = "setTab ('two', 1, 4)"> News 1 </li>
<Li id = "two2" onclick = "setTab ('two', 2, 4)"> News 2 </li>
<Li id = "two3" onclick = "setTab ('two', 3,4)"> News 3 </li>
<Li id = "two4" onclick = "setTab ('two', 4,4)"> News 4 </li>
</Ul>
</Div>
<Div class = "Contentbox">
<Div id = "con_two_1"> News list 1 </div>
<Div id = "con_two2" style = "display: none"> News list 2 </div>
<Div id = "con_two_3" style = "display: none"> News list 3 </div>
<Div id = "con_two_4" style = "display: none"> News list 4 </div>
</Div>
</Div>

We can see that the preceding two does not exist. Copy the above section and change two to three or any id with different names.
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN"> <ptml xmlns = "http://www.w3.org/1999/xhtml"> <pead> <meta http-equiv = "Content-Type "content =" text/html; charset = gb2312 "/> <title> concise Tab </title> <style type =" text/css "> </style> </pead> <body> <ul> <li id = "one1" onclick = "setTab ('one ', 1, 4) "> News 1 </li> <li id =" one2 "onclick =" setTab ('one', 2, 4) "> News 2 </li> <li id =" one3 "onclick =" setTab ('one', 3,4) "> News 3 </li> <li id =" one4 "onclick =" setTab ('one', 4,4) "> News 4 </li> </ul> News list 1 News list 2 News list 3 News list 4 <ul> <li id =" two1 "onclick =" setTab (' two ', 1, 4) "> News 1 </li> <li id =" two2 "onclick =" setTab ('two', 2, 4) "> News 2 </li> <li id =" two3 "onclick =" setTab ('two', 3,4) "> News 3 </li> <li id =" two4 "onclick =" setTab ('two', 4, 4) "> News 4 </li> </ul> News list 1 News list 2 News list 3 News list 4 </body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
I forgot to change tab2 to tab3. For the same page div, the id cannot be repeated.

Related Article

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.