获取下拉列表的选定值(Get Selected Value for drop down list)

编程入门 行业动态 更新时间:2024-10-11 19:13:36
获取下拉列表的选定值(Get Selected Value for drop down list)

我已经使用jQuery脚本在客户端填充了我的下拉列表。

但是,在回发后,下拉列表的选定值不会得到维护。

如何在服务器端将所选值设置为下拉列表或者是否可以在客户端...

我正在动态创建下拉列表,我的下拉列表是服务器端控件。

I have filled my drop down list on client side using jQuery script.

However, on post back the selected values of drop down list does NOT get maintained.

How can i set the selected value to drop down list on server side Or is it possible on client side...

I am creating my drop down list dynamically and my drop down list is a server side control.

最满意答案

在客户端:

用$("#the_select").val(the_value);设置值$("#the_select").val(the_value);

用$("#the_select").val();获取值$("#the_select").val();

On the client side:

set the value with $("#the_select").val(the_value);

get the value with $("#the_select").val();

更多推荐

本文发布于:2023-07-18 07:17:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1156679.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:列表   Selected   list   drop

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!