码迷,mamicode.com
首页 > Web开发 > 详细

MVc 文本框设计样式

时间:2015-07-17 11:30:46      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:

<td colspan="6">

<textarea class="content" name="content" style="height:250px;width:690px">@(Model.content)</textarea>(或者)

@Html.TextAreaFor(it => it.content, 19, 100, new {style="margin:8px 0 0 0;width:719px;" })

</td>

 

 

js显示样式

 

$(function () {
//正文文本框的样式的实现
KindEditor.ready(function (K) {
K.create(‘textarea[class="content"]‘, {
allowImageUpload: true,
cssPath: ‘@Url.Content("~/KindEditor/plugins/code/prettify.css")‘,
uploadJson: ‘@Url.Content("~/KindEditor/Upload")‘,
fileManagerJson: ‘@Url.Content("~/KindEditor/Browse")‘,
allowFileManager: true,
afterCreate: function () { this.sync(); },
afterBlur: function () {
this.sync();
}
});
});

 

当输入特殊字符时可能会报出输入危险字符

这是在conntrator中的Edit前要加入    [ValidateInput(false)] 取消非法验证

MVc 文本框设计样式

标签:

原文地址:http://www.cnblogs.com/zxk3113/p/4653501.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!