MVC3中给Html.TextAreaFor设置默认值

发布时间:2016-7-15 16:31:10

<div class="editor-field">
    @Html.TextAreaFor(model => model.Comments)
    @Html.ValidationMessageFor(model => model.Comments)
</div>
<script type="text/javascript">
    $(function () {
        $("#Comments").html("default value");
    });
</script>