的DropDownList的SelectedIndexChanged事件是不使用jQuery [英] selectedindexchanged event of dropdownlist is not working with jquery

查看:113
本文介绍了的DropDownList的SelectedIndexChanged事件是不使用jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我有一个的DropDownList 。我使用jQuery插件给风格的DropDownList 。 jQuery插件为 jquery.dd.js 。但我的问题是的SelectedIndexChanged 事件不会在Internet exlorer 8个工作虽然它工作正常在其他浏览器。

hello I have a dropdownlist. I am using jquery plugin to give style to dropdownlist. jquery plugin is jquery.dd.js. but my problem is selectedindexchanged event is not working in Internet exlorer 8 although it is working fine in other browsers.

推荐答案

试试这个:

$('#yourSelectId').change(function() {
    var selectedVal = $('#yourSelectId option:selected').attr('value');
});

你会得到内部selectedVal值

you will get the value inside selectedVal

这篇关于的DropDownList的SelectedIndexChanged事件是不使用jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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