onclick方法想要显示特定的状态候选信息 [英] onclick method wanted to display particular state candidate information

查看:71
本文介绍了onclick方法想要显示特定的状态候选信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的新求职网站需要一个jquery程序。我创建了雇主搜索页面,因此该页面包含多个州候选人详细信息。当用户单击给定状态的复选框并提交按钮时,特定学生的详细信息将显示在整个页面上。







I need a jquery program for my new jobconsultancy website. i have created employer searchng page so thiz page is containg several state candidate details.when the user click the check box of given state and submit the button .the the particular students details display on the entire page.



<div class="refaine123">
<div class="af-experiance"><span class="search-af-af-11">Location</span></div>
<div class="af-exp-dtl-1"><input name="sa" type="checkbox" value="" id="chk_delhi" runat="server"/>
Delhi </div>
<div class="af-exp-dtl-1"><input name="sa" type="checkbox" value="" id="chk_kochi" runat="server" />
Ernamkulam </div>
<div class="af-exp-dtl-1"><input name="sa" type="checkbox" value="" />
Mumbai </div>
<div class="af-exp-dtl-1"><input name="sa" type="checkbox" value="" />
Chennai </div>
<div class="af-exp-dtl-1"><input name="sa" type="checkbox" value="" />
Bangalore </div>
<div class="af-exp-dtl-1"><input name="sa" type="checkbox" value="" />
Others </div>
<div class="af-exp-dtl-2">Submit</div>
</div>

推荐答案

我们无法继续工作整个源代码。相反,我可以给出逻辑。



1.调用一个 JavaScript 函数 onclick 那些 CheckBoxes

2.在那个事件中,做一个 jQuery Ajax 调用Code Behind中的 WebMethod 并传递所选的 CheckBox 值。

3.在那里 WebMethod ,根据您的逻辑,根据 CheckBox 值获取学生的详细信息。

4.从 WebMethod 返回那些记录。

5.通过在 aspx中分配返回值来显示记录详细信息页面由 JavaScript / jQuery



要了解 jQuery Ajax WebMethod ,请参阅 - 使用jQuery直接调用ASP.NET AJAX页面方法 [ ^ ]。
We can't work on the entire source code. Instead I can give the logic.

1. Call one JavaScript function onclick of those CheckBoxes.
2. In that event, make a jQuery Ajax call to a WebMethod in Code Behind and pass the selected CheckBox value.
3. In that WebMethod, fetch the details of student according to CheckBox value according to your logic.
4. Return those records from that WebMethod.
5. Show the record details by assigning returned values in aspx page by JavaScript/jQuery.

To learn about jQuery Ajax and WebMethod, refer - Using jQuery to directly call ASP.NET AJAX page methods[^].


按照 Tadit Dash 给出的分步说明。



只需添加额外的参考链接



Article [ ^ ]
Follow the Step by Step instructions given by Tadit Dash.

Just adding an additional reference link

Article [^]


这篇关于onclick方法想要显示特定的状态候选信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆