2017-10-16 73 views
-3

好好查看我的代碼並附上圖片。我如何在這裏使用ajax。我如何能夠使用AJAX呼叫

對我來說,我的要求是,當用戶客戶端類型,然後鍵入網格是開放的,當用戶點擊身高那麼高網格是開放的,其他的將被關閉。

<div class="table-responsive tablescroll" id="tableTypescroll"> 
    <table class="table table-hover" id="tblType"> 
    <thead> 
     <tr> 
     <th>Head Panel Types</th> 
     <th>Edit</th> 
     <th>Delete</th> 
     </tr> 
    </thead> 
    <tbody> 
    </tbody> 
    </table> 
</div> 
<div class="table-responsive tablescroll" id="tableHeightscroll"> 
    <table class="table table-hover" id="tblHeight"> 
    <thead> 
     <tr> 
     <th>Heights</th> 
     <th>Edit</th> 
     <th>Delete</th> 
     </tr> 
    </thead> 
    <tbody></tbody> 
    </table> 
</div> 

enter image description here

+1

'懇請審查我的代碼' - 沒有。 '我是如何隱藏的div使用AJAX call' Ajax調用什麼都沒有做與操縱DOM –

+0

請花一些時間來閱讀[問]和[MCVE] – charlietfl

+0

我沒有得到你的觀點@jaromanda? – Malik

回答

0

我建議你使用jQuery的手風琴來代替,或jQuery的標籤,你沒有使用Ajax隱藏和顯示你的div,

,因爲你的目標只是爲了隱藏和顯示你的div,

+0

您是否有任何示例代碼?在哪裏我知道我在這些div中如何使用它?由於 – Malik

+0

https://jqueryui.com/tabs/這裏是鏈接到jQuery的標籤,他們也有一個示例代碼在這裏 – apelidoko

+0

謝謝,我會嘗試這個:) – Malik