EasyUI的textbox,如果用了disable, 那么提交时,后台mvc controller是取不到值的, 

如果用了Readonly, textbox的样式又没有变化, 让人一眼就感知到哪些是不能改的.

可以加上这样的样式,让readonly和disabled的样式一样

        input:read-only {
            background-color: #f3f3ef;
        }

 

 用EasyUI的comboBox,赋值不能再document.Ready里写,因为已经渲染完了.
        $("#entity\\.Node").val("@Html.Raw(ViewBag.entity.Node)");  // 用EasyUI的comboBox,赋值不能再document.Ready里写,因为已经渲染完了.

$(function () { console.log($("#entity\\.Node").val()) // 开始写 jQuery 代码... $("#entity\\.Node").val("@Html.Raw(ViewBag.entity.Node)"); console.log($("#entity\\.Node").val()) });

 EasyUI的DateTimeBox, 赋值时不能直接传C#的dateTime对象给它, 它会显示错误的日期(本来是2019-3-18 10:00:00的, 它会给你显示成2019-3-{当天日期} 10:00:00

要传格式化好的String

<input id="entity.FeePayDate" name="entity.FeePayDate" type="text" class="easyui-datetimebox" value="@ViewBag.entity.FeePayDate.ToString("yyyy-MM-dd HH:mm:ss")" />

 

posted on 2019-03-04 16:19  Gu  阅读(2750)  评论(0编辑  收藏  举报