<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>CDeditor</title>
<--引用Ckeditor的js-->
<script src="ckeditor/ckeditor.js" type="text/javascript"></script>
<script type="text/javascript">
function test()
{
//applicationform是ckeditor的id或者名字
var val = CKEDITOR.instances.applicationform.getData();
if (val.length == 0)
{
alert("空白");
}
else
{
alert(val);
}
}
</script>
</head>
<body>
<textarea id="applicationform" class="ckeditor" name="applicationform" rows="30" cols="20">Ckeditor内容</textarea>
<input type="button" class="selectButton" value="获取内容" onclick="test();" />
</body>
</html>