怎调用另外一个页面里的JavaScript函数啊

zhghl 2004-09-24 09:11:47
多谢
...全文
111 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
歪歪 2004-09-24
  • 打赏
  • 举报
回复
<TABLE cellSpacing=0 cellPadding=1 width="100%" bgColor=#cccc99
border=0><TBODY>
<TR>
<TD width="100%" height=15>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#cccc99
border=0>
<TBODY>
<TR>
<TD vAlign=center align=left bgColor=#eeeecc height=2>
<DIV align=center>操作系统</DIV></TD></TR>
<TR>
<TD vAlign=top bgColor=#ffffff>
<DIV align=center><A
href="http://61.171.118.168/netbook/tech/Windows/">Windows系列</A></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=1 width="100%" bgColor=#cccc99
border=0><TBODY>
<TR>
<TD width="100%" height=73>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#cccc99
border=0>
<TBODY>
<TR>
<TD vAlign=center align=left bgColor=#eeeecc height=2>
<DIV align=center>实用软件</DIV></TD></TR>
<TR>
<TD vAlign=top bgColor=#ffffff height=54>
<DIV align=center><A
href="http://61.171.118.168/netbook/tech/filemange/">管理维护
</A><BR><BR><A
href="http://61.171.118.168/netbook/tech/imagemedia/">多媒体与图像</A>
</DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=1 width="100%" bgColor=#cccc99
border=0><TBODY>
<TR>
<TD width="100%" height=15>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#cccc99
border=0>
<TBODY>
<TR>
<TD vAlign=center align=left bgColor=#eeeecc height=2>
<DIV align=center>冲浪宝典</DIV></TD></TR>
<TR>
<TD vAlign=top bgColor=#ffffff>
<DIV align=center><A
href="http://61.171.118.168/netbook/tech/creatweb/">网络组建</A><BR><BR><A
href="http://61.171.118.168/netbook/tech/goweaver/">入门技巧</A></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR></TD>
<TD vAlign=top height=581><BR>
<TABLE width="100%" border=0>
<TBODY>
<TR>
<TD class=shadow vAlign=center align=middle>子父窗口之间的操作之小例子</TD></TR>
<TR>
<TD class=shadow vAlign=center align=right>
<HR color=#7d561c noShade SIZE=1>
</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="96%" align=center>
<TBODY>
<TR>
<TD class=f14b vAlign=top><!-- #BeginEditable "cont" --><BR>
<P>
用window.openr打开的子父窗口之间的操作跟框架的是不一样的,子窗口和父窗口之间有opener来联系。而源窗口要访问子窗口要通过其句柄来操作。以下小例子希望能帮助新手更了解他们的操作。</P>
<P><STRONG>test.htm</STRONG>  </P>
<P><html><BR><head><BR><meta
http-equiv="Content-Type" content="text/html;
charset=gb2312"><BR><meta name="GENERATOR" content="Microsoft
FrontPage 4.0"><BR><meta name="ProgId"
content="FrontPage.Editor.Document"><BR><title>子父窗口的操作</title><BR></head><BR><body><BR><script><BR>var
win=null;<BR>function
op(){<BR>win=window.open("about:blank","win","width=200,height=200");<BR>win.document.write("<input
type='button' value='关闭父窗口'
onclick='window.opener.opener=null;window.opener.close()'>");<BR>win.document.write("<input
type='button' value='刷新你窗口'
onclick='window.opener.location.reload()'>");<BR>}<BR></script><BR><input
onclick="op()" value="打开窗口" type="button"><input type="button"
value="最小化"
onclick="if(win&&win.open&&!win.closed){win.resizeTo(0,0);win.moveTo(0,window.screen.width);}else
alert('还没有打开窗口或已经关闭')"><input type="button" value="最大化"
onclick="if(win&&win.open&&!win.closed){win.moveTo(-4,-4);win.resizeTo(screen.availWidth+8,screen.availHeight+8);}else
alert('还没有打开窗口或已经关闭');"><input type=button value="关闭子窗口"
onclick="if(win&&win.open&&!win.closed){win.opener=null;win.close()}else
alert('还没有打开窗口或已关闭')"><input type=button value="刷新子窗口"
onclick="if(win&&win.open&&!win.closed){win.location.reload();win.focus()}else
alert('窗口还没有打开或已关闭')"><input type="button" value="看子窗口的大小"
onclick="if(win&&win.open&&!win.closed){alert(win.document.body.clientWidth+'*'+win.document.body.clientHeight);win.focus();}else{alert('还没有打开窗口或者已关闭')};"><BR></body><BR></html></P>
<P><STRONG>运行效果如下:</STRONG></P>
<P> </P>
<META content="Microsoft FrontPage 4.0" name=GENERATOR>
<META content=FrontPage.Editor.Document name=ProgId>
<SCRIPT>

var win=null;

function op(){

win=window.open("about:blank","win","width=200,height=200");

win.document.write("<input type='button' value='关闭父窗口' onclick='window.opener.opener=null;window.opener.close()'>");

win.document.write("<input type='button' value='刷新你窗口' onclick='window.opener.location.reload()'>");

}

</SCRIPT>
<INPUT onclick=op() type=button value=打开窗口><INPUT onclick="if(win&&win.open&&!win.closed){win.resizeTo(0,0);win.moveTo(0,window.screen.width);}else alert('还没有打开窗口或已经关闭')" type=button value=最小化><INPUT onclick="if(win&&win.open&&!win.closed){win.moveTo(-4,-4);win.resizeTo(screen.availWidth+8,screen.availHeight+8);}else alert('还没有打开窗口或已经关闭');" type=button value=最大化><INPUT onclick="if(win&&win.open&&!win.closed){win.opener=null;win.close()}else alert('还没有打开窗口或已关闭')" type=button value=关闭子窗口><INPUT onclick="if(win&&win.open&&!win.closed){win.location.reload();win.focus()}else alert('窗口还没有打开或已关闭')" type=button value=刷新子窗口><INPUT onclick="if(win&&win.open&&!win.closed){alert(win.document.body.clientWidth+'*'+win.document.body.clientHeight);win.focus();}else{alert('还没有打开窗口或者已关闭')};" type=button value=看子窗口的大小>

<P>以上只供参考,有错请纠正,谢谢!</P><BR><!-- #EndEditable --></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<CENTER>
<SCRIPT language=JavaScript
src="网络社团--技术文档--子父窗口之间的操作之小例子.files/bottom.js"></SCRIPT>

<TABLE cellSpacing=0 cellPadding=0 width=500 align=center border=0>
<TBODY>
<TR>
<TD class=myknotse1 align=middle><BR>本网站所有资料版权归结网络社团所有<BR>© 2002~2003<FONT
color=white size=1></FONT></TD></TR></TBODY></TABLE></CENTER></BODY></HTML>
歪歪 2004-09-24
  • 打赏
  • 举报
回复
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0077)http://61.171.118.168/netbook/tech/javascript/html/javascript.ohchina.167.htm -->
<HTML><HEAD><TITLE>网络社团--技术文档--子父窗口之间的操作之小例子</TITLE><!-- #BeginEditable "doctitle" --><!-- #EndEditable -->
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>.a {
COLOR: #000000
}
A:active {
COLOR: #000000; TEXT-DECORATION: none
}
A:link {
COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
COLOR: #ff0000; TEXT-DECORATION: underline
}
TABLE {
FONT-SIZE: 9pt
}
.white {
COLOR: #ffffff; TEXT-DECORATION: none
}
.white:active {
COLOR: #ffffff; TEXT-DECORATION: none
}
.white:hover {
COLOR: #ff0000; TEXT-DECORATION: none
}
.white:link {
COLOR: #ffffff
}
.black {
COLOR: #000000; TEXT-DECORATION: none
}
.black:active {
COLOR: #000000; TEXT-DECORATION: none
}
.black:hover {
COLOR: #ff0000; TEXT-DECORATION: none
}
.black:link {
COLOR: #000000; TEXT-DECORATION: none
}
</STYLE>
<LINK href="网络社团--技术文档--子父窗口之间的操作之小例子.files/style.css" type=text/css
rel=stylesheet>
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY bottomMargin=0 bgColor=#ffffff leftMargin=0 topMargin=0 rightMargin=0
marginwidth="0" marginheight="0">
<DIV align=center>
<SCRIPT language=JavaScript
src="网络社团--技术文档--子父窗口之间的操作之小例子.files/top.js"></SCRIPT>

<SCRIPT language=JavaScript
src="网络社团--技术文档--子父窗口之间的操作之小例子.files/items.js"></SCRIPT>
</DIV>
<TABLE cellSpacing=0 cellPadding=0 width=778 align=center>
<TBODY>
<TR>
<TD vAlign=top width=160 height=581>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD height=52>
<DIV align=center><IMG height=48
src="网络社团--技术文档--子父窗口之间的操作之小例子.files/webdi.jpg"
width=160></DIV></TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=1 width="100%" bgColor=#cccc99
border=0><TBODY>
<TR>
<TD width="100%" height=15>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#cccc99
border=0>
<TBODY>
<TR>
<TD vAlign=center align=left bgColor=#eeeecc height=2>
<DIV align=center>网络时代</DIV></TD></TR>
<TR>
<TD vAlign=top bgColor=#ffffff>
<DIV align=center><A
href="http://61.171.118.168/netbook/tech/creatsite/">网站建设</A>
</DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=1 width="100%" bgColor=#cccc99
border=0><TBODY>
<TR>
<TD width="100%" height=84>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#cccc99
border=0>
<TBODY>
<TR>
<TD vAlign=center align=left bgColor=#eeeecc height=2>
<DIV align=center>网页设计</DIV></TD></TR>
<TR>
<TD vAlign=top width="100%" bgColor=#ffffff height=55>
<DIV align=center>
<P><A
href="http://61.171.118.168/netbook/tech/html/">HTML</A><BR><A
href="http://61.171.118.168/netbook/tech/css/">CSS</A><BR><A
href="http://61.171.118.168/netbook/tech/javascript/">JavaScript</A><BR><A
href="http://61.171.118.168/netbook/tech/dreamweaver/">DreamWeaver</A><BR><A
href="http://61.171.118.168/netbook/tech/flash/">Flash</A></P></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=1 width="100%" bgColor=#cccc99
border=0><TBODY>
<TR>
<TD width="100%" height=15>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#cccc99
border=0>
<TBODY>
<TR>
<TD vAlign=center align=left bgColor=#eeeecc height=2>
<DIV align=center>美工教室</DIV></TD></TR>
<TR>
<TD vAlign=top bgColor=#ffffff>
<DIV align=center><A
href="http://61.171.118.168/netbook/tech/fireworks/">Firworks</A><BR><A
href="http://61.171.118.168/netbook/tech/photoshop/">Photoshop</A><BR><A
href="http://61.171.118.168/netbook/tech/3dmax/">3DS
Max</A><BR><A
href="http://61.171.118.168/netbook/tech/CorelDRAW/">CorelDraw</A></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=1 width="100%" bgColor=#cccc99
border=0><TBODY>
<TR>
<TD width="100%" height=15>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#cccc99
border=0>
<TBODY>
<TR>
<TD vAlign=center align=left bgColor=#eeeecc height=2>
<DIV align=center>程序开发</DIV></TD></TR>
<TR>
<TD vAlign=top bgColor=#ffffff>
<DIV align=center><A
href="http://61.171.118.168/netbook/tech/Visualbasic/">Visual
Basic</A><BR><A
href="http://61.171.118.168/netbook/tech/VisualC++/">Visual
C++</A><BR><A
href="http://61.171.118.168/netbook/tech/java/">Java</A><BR><A
href="http://61.171.118.168/netbook/tech/Delphi/">Delphi</A><BR><A
href="http://61.171.118.168/netbook/tech/perl/">Perl</A><BR><A
href="http://61.171.118.168/netbook/tech/php/">PHP</A><BR><A
href="http://61.171.118.168/netbook/tech/asp/">ASP</A><BR><A
href="http://61.171.118.168/netbook/tech/dotnet/">.NET</A><BR><A
href="http://61.171.118.168/netbook/tech/other_language/">其他开发语言</A><BR><A
href="http://61.171.118.168/netbook/tech/database/">数据库开发</A><BR><A
href="http://61.171.118.168/netbook/tech/game/">游戏开发</A><BR><A
href="http://61.171.118.168/netbook/tech/fileformat/">文件格式</A><BR><A
href="http://61.171.118.168/netbook/tech/other/">其
他</A><BR></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
cybernaute 2004-09-24
  • 打赏
  • 举报
回复
最好把一些公用的函数等,放在一个独立的文件里,然后调用!
zltostem 2004-09-24
  • 打赏
  • 举报
回复
----- a.asp -----

<input type=button value=ok onclick="document.frames[0].show();">
<iframe src='b.asp'></iframe>

----- b.asp -----

Is b.asp
<script language="javascript">
<!--
function show()
{
alert('clement');
}
//-->
</script>
whnnet 2004-09-24
  • 打赏
  • 举报
回复
知道窗口对象为winX,可以用
winX.methodXX()
winX.变量d
whnnet 2004-09-24
  • 打赏
  • 举报
回复
2个窗口必须有关系才行,比如:
var xxx = "ok"
a = window.open("b.htm")
在b.htm可以用
alert(opener.xxx)
代码下载地址: https://pan.quark.cn/s/f772f44531a5 FFmpeg 是一款功能丰富的开源命令行软件,能够对多种类型的多媒体数据,涵盖音频及视频内容,进行操作。它具备多种能力,例如进行格式转换、合并不同媒体、分割文件、执行编码与解码处理、以及实现流媒体传输等。在此特定情境下,主要探讨如何运用 FFmpeg 来处理 MP4 文件的播放难题,特别是那些无法通过流式传输正常播放的文件。MP4 文件播放时可能遇到的障碍,可能是由播放器不兼容的编码方式、容器结构错误、元数据位置设置不当,或是缺少必要的流信息所导致。FFmpeg 能够协助我们识别并修正这些问题。 1. **针对 MP4 文件的检测与修复**:借助 FFmpeg 的 `-i` 参数,可以获取 MP4 文件的详细资料,例如: ``` ffmpeg -i problematic.mp4 ``` 若发现编码方式、时间轴或容器结构存在问题,可尝试对文件进行重新封装(remuxing)或重新编码(transcoding)。例如,通过简单的重新封装操作: ``` ffmpeg -i problematic.mp4 -c copy fixed.mp4 ``` 此指令将维持视频和音频流的原状,仅更换文件的容器格式。 2. **应对流传输挑战**:当文件无法以流方式播放时,通常是因为流信息未正确嵌入文件头部。FFmpeg 可用于解决该问题: ``` ffmpeg -i problematic.mp4 -movflags +faststart output.mp4 ``` ...
内容概要:本文提出了一种基于TOGI-SOGI混合积分器的光储并网谐波自适应抑制方法,并提供了完整的Simulink仿真实现方案。该方法通过融合三阶广义积分器(TOGI)与二阶广义积分器(SOGI),构建高性能混合结构,显著提升了对电网电压畸变中谐波成分的检测精度与动态响应能力,进而实现并网电流谐波的高精度自适应补偿控制。文中系统阐述了混合积分器的设计原理、谐波提取机制、自适应控制策略及其在光伏储能并网系统中的集成应用,突出其在改善电能质量、增强系统稳定性和抗干扰能力方面的优势。配套的Simulink仿真模型充分验证了该方法在不同电网工况下的有效性、鲁棒性与工程应用潜力。; 适合人群:具备电力电子、新能源并网或自动控制等相关专业知识背景,从事光伏储能系统、逆变器控制、电能质量治理等领域研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①掌握TOGI-SOGI混合积分器在谐波检测中的设计原理与实现方法;②深入理解光储并网系统中谐波抑制的控制架构与自适应补偿机制;③复现、验证并优化所提供的Simulink仿真模型,服务于学术论文撰写、课题研究或实际工程项目的开发与测试。; 阅读建议:建议结合提供的Simulink模型文件进行同步仿真操作,细致分析各功能模块的参数配置与信号流向;重点关注混合积分器的频率自适应特性与谐波分离性能,并可通过设置不同的电网畸变场景来测试和评估控制策略的鲁棒性与动态性能。

87,987

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧