I really don't know how to ask for help when it comes to tab switching issues! _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:09:50
Original
848 people have browsed it

The boss asked me to make this one: tag 1, tag 2, tag 3...., and then after clicking the tag, a page will appear below, which is the same as the 2012 version of the QQ chat window, except that ours is under html Switch pages, how to write this?

<tr><td class="ooihj" nowrap onclick="ghbq(this)">标签一</td><td class="ooihs" nowrap onclick="ghbq(this)">标签二</td><td class="ooihs" nowrap onclick="ghbq(this)">标签三</td><td class="ooihs" nowrap onclick="ghbq(this)">标签四</td><td class="ooihx" width="100%"> </td>  </tr>
Copy after login

For example, for the 4 tags above, each time you click on one, a page will appear below. These pages must be presented one by one, and they cannot all be presented using the display method. My understanding is that these tags are links one by one, linking to the corresponding page. After clicking, the corresponding page will be displayed in the corresponding area (this is very important, I don’t know how to do it). Please help me, please give me an example. ! Thank you very much!


Reply to discussion (solution)

http://paranimage.com/9-tabs-based-javascript/

If It is relatively simple for colleagues to load a page using jquery, including a small movement from left to right when clicked. If it becomes a link, you may need to learn asynchronous loading. I am not very familiar with asynchronous loading while learning. There are some in jquery. A load() method can easily implement asynchronous loading.

If a colleague loads a page, it is relatively simple to implement it with jquery, including that when clicked, there will be a small movement from left to right and become a link. , you may want to learn asynchronous loading. While studying, I don’t know much about asynchronous loading. There is a load() method in jquery, which can simply implement asynchronous loading. It seems that asynchronous loading does not need to be so complicated. It is just a link. Click the link, as follows Load it yourself. Do you know how to do it? It’s actually not that complicated. I know that I have written all the loaded pages. I just need to load the links

<tr><td class="ooihj" nowrap onclick="ghbq(this)">标签一</td><td class="ooihs" nowrap onclick="ghbq(this)">标签二</td><td class="ooihs" nowrap onclick="ghbq(this)">标签三</td><td class="ooihs" nowrap onclick="ghbq(this)">标签四</td><td class="ooihx" width="100%"> </td>  </tr>都加个id属性标签一标签二标签三标签四   
Copy after login




//这个方法中做判断function ghbq(obj){  var id=$(obj).attr(id);  if(id=="1"){   //显示 1.html    }else if(id=="2"){   //显示 2.html   }}  
Copy after login

You can try jquery tab, basically no need to write code. Instead of hard-coded display, use ajax loading.
If you don’t want ajax, just iframe,

1 2

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template