@Html.RadioButtonFor(e => e.degree_difficulty, "易", new { @checked = "checked" })
@Html.DropDownListFor(e => e.TK_minid, new SelectList(ViewBag.que, "Value", "Text"), new { @class = "form-control", @data_ive_search = "true" })
@Html.TextBoxFor(e => e.Score, new { @class = "form-control", oninput = "value=value.replace(/[^\\d]/g,'')", maxlength = "3" })
@Html.TextAreaFor(e => e.PicObj, new { @class = "form-control IsShow", @id = "PicObj" })
@Html.HiddenFor(e => e.id);
@Html.Raw(Json.Encode(Model))
@Html.Raw()的作用
@Html.Raw() 方法输出带有html标签的字符串,如:
@Html.Raw("<div style='color:red'>红字</div>")
结果:红字
如果不用,则会输出:‘<div style='color:red'>红字</div>’
MVC技巧2 @html
最新推荐文章于 2021-07-02 17:00:10 发布