简体   繁体   中英

Get the name of the textbox in Partial

@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)

在此处输入图片说明

no display messagebox!!!! and set under line no display messagebox!!!! and set under line no display messagebox!!!! and set under line

Your text box has no name. Give name like following

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM