簡體   English   中英

如何將用戶從一個選項卡重定向到另一頁的另一選項卡?

[英]How to redirect an user from one tab to another tab of other page?

基本上我有2頁:-

索引頁

   <div class="box-footer text-center">
   <a href="~/Groups/MyGroups.html#sent" class="uppercase" id="viewGrp">View my Groups</a>
  </div>  

MyGroups.html

  <ul class="nav nav-tabs pull-right ui-sortable-handle">
      <li class=""><a id="clickSearch" data-toggle="tab" href="#search" aria-expanded="false">Search</a></li>
     <li class=""><a data-toggle="tab" href="#sent" aria-expanded="false">My Groups</a></li>
     <li class="active"><a data-toggle="tab" href="#all" aria-expanded="true">All Groups</a></li>
    <li class="pull-left header"><i class="fa fa-inbox"></i> Groups</li>
 </ul>
<div id="sent" class=" tab-pane">
         //some content  
 </div>

現在,如何通過單擊“查看我的組”將用戶從HTML頁面1重定向到另一個HTML頁面上的#sent div?

瑣事:-使用jquery .click() .click jquery .click()函數

但是需要正確的語法指導。

對此進行了了解,得到了基本的想法,但仍然無法實現所需的功能。

您可以直接從首頁的href鏈接

<a href="page2.html#sent" class="uppercase" id="viewGrp">View my Groups</a>

#sent添加到鏈接將自動滾動到相應的div

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM