opener.document.page1form.page1field.value;
解决方案 »
- 架构师是怎样练成的,望高人指点
- 如何通过css控制div在页面显示的大小
- Struts的表单提交问题
- Axis2的如何实现rpc方式的soap?
- 高手进来,调用EJB的客户端应用程序打包问题求解啊!!
- Webservices问题,急。在线等!重酬200分!
- 我写了段代码,主要是想通过weblogic访问数据库,但是运行时出错:Could not find the main class.代码如下:请大侠们帮忙啊!
- 大家又没有参加java开源项目的啊?推荐推荐
- Linux 下解压zip文件
- 想知道这个是发生了什么问题。
- (求助)配置axis环境
- 谁知道JAVA有个IDE叫“卡鲁”的吗?从哪里下载?
恐龙啊!
没一个好看的,鄙视,鄙视,在鄙视
撒比
<html:form action="/eKeepMail.do?task=doUpdate">
<html:textarea property="content" rows="4" cols="90"/><input type="button" value="Preview" onClick="javascript:window.open('eKeepMail.do?task=preView','window', 'height=480, width=650, top=150, left=250, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')"/><html:submit value="Save"/>
</html:form>page2:
<bean:write name="eKeepMailFormBean" property="content"/>注:page1和page2使用同一个Form:eKeepMailFormBean。
使用yin_slin(一生找北)的方法可以alert:
alert(opener.document.page1form.page1field.value)结果是正确的,但是怎么在页面显示啊。谢谢大家:)
至于你提到说换行的问题,第二种是没有这个问题的,第一种可能会有(我也不是高手,不确定啦),那就要把换行符事先用javascript替换成一些示意符(比如|啦),javascript里换行符的转意字符同C一样"\r\n"
to Alex_20(吉尔菲艾斯) :
document.write,不可以,因为page2还有其他内容要显示。
<SCRIPT event=onload for=window language=JavaScript>
document.all("test").innerText = opener.document.eKeepMailFormBean.content.value;
</SCRIPT><textarea id="test" readOnly="true" isMultiLine="true" style="border-width:0;border-color:#fff" rows="10" cols="100"></textarea>
但是用户看到的内容应该是直接显示在页面上,而不是在控件里。