给所有的TextArea都添加上fck
<script type="text/javascript">
var allTextAreas = document.getElementsByTagName("textarea");
for (var i=0; i < allTextAreas.length; i++) {
alert(allTextAreas[i].id);
$('#'+allTextAreas[i].id).ckeditor();
}
</script>
ckeditor allTextAreas
本文介绍了一种使用JavaScript遍历所有TextArea元素并为它们添加CKEditor富文本编辑器的方法。通过执行简单的脚本,可以实现对页面中所有文本区域的统一配置。

被折叠的 条评论
为什么被折叠?



