【问题标题】:Get the name of the textbox in Partial获取 Partial 中文本框的名称
【发布时间】:2015-06-03 16:05:00
【问题描述】:
@model DateTime?

<script type="text/javascript">
$(document).ready(function () {
var NameField = $(".pdate");
alert(NameField.attr("name"));
var objCal1 = new AMIB.persianCalendar(NameField);
});
</script>

@Html.TextBox("", Model, new { @class = "pdate" })

@Html.Hidden("", Model)

不显示消息框!!!! 并设置在行下 不显示消息框!!!! 并设置在行下 不显示消息框!!!! 并在行下设置

【问题讨论】:

    标签: javascript c# asp.net-mvc razor partial-views


    【解决方案1】:

    您的文本框没有名称。像下面这样命名

    @Html.TextBox("aName", Model, new { @class = "pdate" })
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-01
      • 2020-05-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多