CKEditor的使用和验证"/>
【前端开发】CKEditor的使用和验证
<!--导入-->
<script type="text/javascript" src="js/ckeditor/ckeditor.js"></script>
----------------------------------------------------------------------------------------------------------------------------------------
<!--页面使用-->
<textarea id="ckeditor0" name="describe" /></textarea>
<script type="text/javascript">
var ckeditor = CKEDITOR.replace("ckeditor0");
</script>
----------------------------------------------------------------------------------------------------------------------------------------
//验证非空
if(CKEDITOR.instances.ckeditor0.getData()==""){
alert("xx不能为空!");
return; //return false;在IE中不会达到你想要的效果
}
----------------------------------------------------------------------------------------------------------------------------------------
更多推荐
【前端开发】CKEditor的使用和验证
发布评论