【发布时间】:2015-10-16 14:35:15
【问题描述】:
我目前在我的应用程序中使用 autoNumeric。 它工作得很好。 但是,在编辑模式下,JQuery 显示此错误消息:
“设置”的值 ($ 100.000.00) 不是数字,导致抛出错误
我有这样的事情:
public string Amount { get; set; }
@Html.TextBoxFor(model => model.Amount, new { @class = "form-control", @placeholder = ModelMetadata.FromLambdaExpression(x => x.Amount, ViewData).Watermark })
$.extend($.fn.autoNumeric.defaults, {
aSep: '@System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberGroupSeparator',
aDec: '@System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator'
});
$("#Amount").autoNumeric('init', { aSign: "$ " });
我已经搜索错误,发现this
但这对我没有帮助。
感谢您的帮助!
【问题讨论】:
-
如果删除
$符号后的空格会怎样? -
那行不通。同样的错误。
标签: c# jquery asp.net asp.net-mvc asp.net-mvc-5