【问题标题】:How to check DropDownlist is null or not in mvc using Jquery如何使用 Jquery 在 mvc 中检查 DropDownlist 是否为空
【发布时间】:2016-10-21 13:25:07
【问题描述】:

如何使用 Jquery 检查 @Html.DropDownList("Countries","--select--") 是否为空

【问题讨论】:

  • SELECT 元素不能为空!你的标题也不一样!你真正的问题是什么?

标签: jquery asp.net-mvc


【解决方案1】:

你可以这样试试

$('#mySelectList > option').length;

【讨论】:

    猜你喜欢
    • 2016-10-04
    • 2011-05-05
    • 2011-10-12
    • 2012-12-30
    • 1970-01-01
    • 2010-12-23
    • 2012-09-13
    • 1970-01-01
    • 2012-06-17
    相关资源
    最近更新 更多