有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java在目标帧中打开窗口

我有一个网站,遇到了一个问题

首先,网站是荷兰语的,但是我的问题是你不必懂荷兰语

我的网站是www.hobbysite.zz.mu/

当你点击登录按钮时,它会将你重定向到mybb论坛登录(这是正确的) 下一部分对我来说是棘手的部分

单击此处的登录按钮时,它应运行以下脚本:

 <html> <head>

     <script language="Javascript">
         function trigger(){ 
     document.php-form.submit(); 
     document.htm-form.submit(); }

     </script> </head>


 <body onload="trigger();">
     <form name="php-form" action="http://hobbysite.zz.mu/top.html" target="_topframe">
     <form name="htm-form" action="http://hobbysite.zz.mu/Main/main.html" target="mainframe">
 </body>

然而,问题是,它并没有做第一个选择,而且有可能“云”集

我的第一个云集是www.hobbysite.zz.mu/top1.html,它应该在目标帧顶部帧中偶然出现hobbysite.zz.mu/top.html

提前谢谢


共 (1) 个答案

  1. # 1 楼答案

    您可以更改框架的位置,而不是尝试提交两个表单。请尝试以下代码:

    <html><head>
    <script>
    function trigger() {
        top.frames["topFrame"].location.href="http://hobbysite.zz.mu/top.html";
        top.frames["mainFrame"].location.href="http://hobbysite.zz.mu/Main/main.html";
    }
    </script>
    </head>
    <body onload="trigger();"> 
    </body></html>