龙v战

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

iframe:

 

父页面调用ifream的方法:   document.frames( "iframename ").functionName();
iframe调用父页的方法:parent.functionName();

父窗体改变iframe的src.  getElementsByName("iframename").src="xxxx";

 

指定刷新时IFRAME最好采用DOM 方法:

1:parent.document.getElementsByName( "Iframe_Alert_Area_Store_List2")[0].src=path+"";

2:parent.document.getElementById('Iframe_Alert_Area_Store_List3').src="<%=request.getContextPath()%>"+"";

 

刷新iframe的方案.

方案一:用iframe的name属性定位
     <input type="button" name="Button" value="Button"
onclick="document.frames('ifrmname').location.reload()">


<input type="button" name="Button" value="Button"
onclick="document.all.ifrmname.document.location.reload()">

方案二:用iframe的id属性定位
<input type="button" name="Button" value="Button"
onclick="ifrmid.window.location.reload()">

终极方案:当iframe的src为其它网站地址(跨域操作时)
<input type="button" name="Button" value="Button"
onclick="window.open(document.all.ifrmname.src,'ifrmname','')">

 

以<a href="" target="_blank"></a>

打开的新窗体可以使用window.opener.XX来调用..

 

JS传中文:

js:     encodeURI(param)

java:   java.net.URLDecoder.decode(param, "UTF-8");

 

td 连续输入英文过长 在td中加入 <table width="100%" style="word-break:break-all; border-collapse: collapse">

 

APP server:

使用websphere开发时.如果不能提交中文.请修改目录中encoding.properties //zh=UTF-8 默认GB2312

posted on 2010-02-03 17:23  龙v战  阅读(216)  评论(0编辑  收藏  举报