2017-10-16 138 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