JQuery Validate & 富文本编辑

2 篇文章 0 订阅

1.       引用相关的JS文件

<script src="../../Scripts/fckeditor.js" type="text/javascript"></script>

<script src="../../Scripts/jquery.validate.js" type="text/javascript"></script>

2 $(document.forms.item(0)).validate({

            errorClass: "error",

            rules:

            {

                Title: "required",

                Content: "required"

            },

            messages:

            {

                Title: "*请输入新闻标题",

                Content: "*请输入新闻正文"

            }

 

        });

详细的使用方法参考: http://student.csdn.net/space.php?uid=42425&do=blog&id=8663

注意:页面元素的name不能为description,我怀疑是这个名字是做为关键字被jquery validate框架使用.

 

3富文本代码:

var oFCKeditor = new FCKeditor('description1');

         FCKeditor.ToolbarSet = "Wiki";

     oFCKeditor.ReplaceTextarea();

<div class="editor-field">

                版本说明

                <textarea rows="6" id="description1" name="description1"><%=Server.HtmlDecode(this.Model.description)%></textarea>

               

            </div>

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值