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>
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,