【发布时间】:2015-09-28 08:01:18
【问题描述】:
这是我的代码:
在我的 MVC 视图中:
@
{
var datefrom = Model.Vehicle.First().DateFrom.ToString("MMMM yyyy")
};
在我的 AjaxBeginForm 中:
{
<input type="hidden" id="vehicledatefrom" value=@datefrom/>
}
我的 jquery:
var datefromto= $('#vehicledatefrom').val() ;
After debugging with break point, the datefrom value is = " July 2006";
But when I am calling the val() in jquery I am getting only "July".
What's the wrong in my code why I am not getting complete value "July 2006";
val() is not taking after the space why any suggestions thanks
【问题讨论】:
标签: javascript c# jquery asp.net-mvc model-view-controller