<script type="text/javascript">
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Height = 300 ;
//documents.write(test);
**oFCKeditor.Value = '';//i want to assign <%=strPageContent%> here but its not working....**
oFCKeditor.Create() ;//-->
</script>
答案 0 :(得分:2)
如果您有一个名为strPageContent
的变量,则以下内容有效:
oFCKeditor.Value = '<%=strPageContent%>';
如果您将它作为请求属性(例如在servlet中设置为request.setAttribute(..)
),而不是作为变量,那么:
oFCKeditor.Value = '${strPageContent}';