【问题标题】:jquery chosen plugin doesn't give the chosen valuejquery 选择的插件没有给出选择的值
【发布时间】:2012-07-31 21:14:08
【问题描述】:

如何获取应用了所选插件的选择当前选择的值。我初始化它的方式是:

$(container).find('.addKeywordTerm [name="addMatchType"]').chosen();
$(container).find('.addKeywordTerm .chzn-search').hide();

我尝试检索该值的方法是:

$(container).find('.addKeywordTerm [name="addMatchType"]').val()

我做错了什么?

【问题讨论】:

    标签: jquery jquery-chosen


    【解决方案1】:

    尝试检查选择器,您可以将 "[name="addMatchType"]" 更改为 id 或 "select[name="addMatchType"]" 或尝试提醒其名称以查看它是否正确选择! :)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-12-01
      • 2012-05-18
      • 2012-04-20
      • 2013-03-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-23
      相关资源
      最近更新 更多