如何获取有关下拉列表选择更改的数据 [英] how to get data on selection change of drop down list
本文介绍了如何获取有关下拉列表选择更改的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨朋友........
我是mvc2中的新手,正在使用与表绑定的下拉列表. empid,empname
有一个文本框.我想在文本框中显示所选员工的年龄.如何使用j查询.
任何帮助解决我的问题.
谢谢..
hi friends ........
i am new in mvc2.I am using a dropdown list binds with table. empid,empname
there is textbox .i want to display age of selected employee in the textbox.how it is possible with j query.
any help solve my problem.
thanks..
推荐答案
您可以像这样使用一些jQuery来绑定下拉列表的change事件...
You can bind the change event of your drop down list using a bit of jQuery like so...
var url = '@Url.Action("GetEmployeeData", "YourController")';
(" #YourElementId").change(
("#YourElementId").change(function () {
.post(url ,{employeeId:
.post(url, { employeeId:
这篇关于如何获取有关下拉列表选择更改的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文