Home >Web Front-end >HTML Tutorial >I really don't know how to ask for help when it comes to tab switching issues! _html/css_WEB-ITnose

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

WBOY
WBOYOriginal
2016-06-24 12:09:50883browse

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>

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属性标签一标签二标签三标签四   




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

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,
dc6dce4a544fdca2df29d5ac0ea9906b5763a2ad76fb97e370ffa2d4ab09c97015db79b134e9f6b82c0b36e0489ee08ed e19d9fce2badc6b245143d9e7313738e25db79b134e9f6b82c0b36e0489ee08ed 16b28748ea4df4d9c2150843fecfba68
f258ff7242156a56141cfac74ecb1c3f065276f04003e4622c4fe6b64f465b88

Statement:
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