use frames['iEditor'].sContent, for example1.editor.htm:
<script language="javascript">
sContent= 999;//this makes sContent part of window
</script>
<input id="txt1" value="123">
2. frame.htm:
<IFRAME src="editor.htm" name=iEditor width="100%" height="190">
</IFRAME>
<input type="button" value="get iframe variable" onclick="alert(frames['iEditor'].sContent)">
<input type="button" value="get iframe value" onclick="alert(frames['iEditor'].document.all('txt1').value)">
<script language="javascript">
sContent= 999;//this makes sContent part of window
</script>
<input id="txt1" value="123">
2. frame.htm:
<IFRAME src="editor.htm" name=iEditor width="100%" height="190">
</IFRAME>
<input type="button" value="get iframe variable" onclick="alert(frames['iEditor'].sContent)">
<input type="button" value="get iframe value" onclick="alert(frames['iEditor'].document.all('txt1').value)">
解决方案 »
- comet技术的聊天室,有没有人会的??
- deleteRow()删除动态表格行的问题!
- 谁有带复选框的树形菜单,其中还要能连接数据库的,分全给了
- 在FIREFOX 等其它浏览器中,以下JAVASCRIPT 不能得到预期效果
- 求救 ..为什么使用 html2canvas 转化的 canvas 不能调用 toDataURL 方法?????????
- jquery模式窗口中打开模式窗口
- 史上最少代码量实现图片360度旋转特效
- 在服务器端如何实现与vb脚本中<% %>的定位功能
- 要做一友好界面!!!!
- to karma 再次请教!
- 怎样才能在一个输入框中输入数字,然后按确定就出现相对应于数字的表格行数?
- 如何使文本框灰色显示,使其不能输入数据?
</IFRAME>
<INPUT type="button" value="显示text控件值" id=button1 name=button1 onclick="alert(iEditor.document.all.txt.value)">
<br>
<INPUT type="button" value="显示变量值" id=button2 name=button2 onclick="alert(iEditor.name)">
----------------------------------------------------------------------
editor.htm
<script language=javascript>
var name="ssm1226";
</script>
<input type=text name=txt value="ssm1226">