举例:xxx.xx;22.13;3336.33
@Html.EditorFor(model => model.Price, new {htmlAttributes = new {@class = "form-control", @type = "text", step = "0.01", @oninput = "this.value=this.value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, '$1');if (navigator.userAgent.indexOf('Firefox') > -1) {;}" } })
注意:Do not delete the if judgment, otherwise there may be problems.
不要删除if判断,否则可能会不兼容火狐浏览器