MVC3中给Html.TextAreaFor设置默认值(初始值)

<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>

 

posted @ 2013-08-26 13:17  James·wang  阅读(7603)  评论(1编辑  收藏  举报