当前位置: 代码迷 >> Web前端 >> FCK 轮换 多个 textarea
  详细解决方案

FCK 轮换 多个 textarea

热度:455   发布时间:2012-09-18 16:21:42.0
FCK 替换 多个 textarea

<html>
<head>
<title>Testing ReplaceAll()</title>

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

<script type="text/javascript">
<!--
function ReplaceAllTextareas() {
// replace all of the textareas
var allTextAreas = document.getElementsByTagName("textarea");
for (var i=0; i < allTextAreas.length; i++) {
var oFCKeditor = new FCKeditor( allTextAreas.name ) ;
oFCKeditor.BasePath = "/FCKeditor/" ;
oFCKeditor.ReplaceTextarea() ;
}
}
// -->
</script>

</head>

<body onLoad="javascript: ReplaceAllTextareas()">

<form>
<input type="checkbox" name="bobby" /> bobby <br />
<input type="checkbox" name="sue" /> sue <br />

Summary:
<textarea name="summary" rows="4" cols="80"> here is the summary </textarea>
Overview:
<textarea name="overview" rows="10" cols="80"> here is the overview </textarea>
Detials:
<textarea name="d??etails" rows="60" cols="80"> here are teh details </textarea>

<input type="submit" name="sue" /> <br />
<input />
</form>

</body>
</html>









  相关解决方案