日期:2014-05-18  浏览次数:20712 次

在线等--eWebEditor多个编辑器取值只能取到第一个值,如何取到后边的值。
我用JSP的在线编辑器EWEBEDITOR
想在当前页面得到那个编辑器的内容。。
    那个编辑器是在IFRAME       <iframe   id=iframe1   src= "^^^^^^^^ "> </iframe> 中的   。
    有个函数可以直接调用到内容就是   iframe1.gethtml()

现在我想把编辑器中编辑好的内容提交。。。
      但是得不到值  
     
          比如说
      var   string1=iframe1.gethtml()
   
那在代码块中我应该怎么得到这个STRING1啊?  
    请大家帮忙解决。
    或是大家有别的解决方案的啊   ?透露给小弟。。谢谢

------解决方案--------------------
<INPUT type= "hidden " name= "content1 " value= " ">
<IFRAME ID= "eWebEditor1 " src= "eWebEditor.jsp?id=content1&style=standard " frameborder= "0 " scrolling= "no " width= "650 " height= "350 "> </IFRAME>


在提交页面中用String sContent = request.getParameter( "content1 ");
取得编辑器的值
------解决方案--------------------
for (int i=0;i <request.getParameterValues( "content1 ").length;i++){
linkContent = linkContent + request.getParameterValues( "content1 ")[i];
}
------解决方案--------------------
用不同的控件名
------解决方案--------------------
<INPUT type= "hidden " name= "content1 " value= " " id= "content1 ">
<IFRAME ID= "eWebEditor1 " src= "eWebEditor.jsp?id=content1&style=standard " frameborder= "0 " scrolling= "no " width= "650 " height= "350 "> </IFRAME>
<INPUT type= "hidden " name= "content2 " value= " " id= "content2 " >
<IFRAME ID= "eWebEditor1 " src= "eWebEditor.jsp?id=content2&style=standard " frameborder= "0 " scrolling= "no " width= "650 " height= "350 "> </IFRAME>


在提交页面中用String sContent = request.getParameter( "content1 ");
取得编辑器的值

String sContent2 = request.getParameter( "content2 ");