Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/447.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript $\u在新编辑的选项卡中打开帖子_Javascript_Php_Html_Css - Fatal编程技术网

Javascript $\u在新编辑的选项卡中打开帖子

Javascript $\u在新编辑的选项卡中打开帖子,javascript,php,html,css,Javascript,Php,Html,Css,试试这个: <form method="post" onsubmit="window.open('http://www.google.com', '_blank', 'toolbar=0,location=0,menubar=0');" > <input type="hidden" name="username" value="<?php echo $username; ?>"/> <inp

试试这个:

<form method="post" onsubmit="window.open('http://www.google.com', '_blank', 'toolbar=0,location=0,menubar=0');" >
                <input type="hidden" name="username" value="<?php echo $username; ?>"/>
                <input type="hidden" name="password" value="<?php echo $password; ?>"/>
                <input onclick="" type="submit" value="OPEN TO BATTLE.php"/>
            </form>


问题是:“为什么?”?这是90年代的“工作方式,但不是我想要的方式”-这到底是什么?我的意思是,$\u POST数据没有进入新选项卡。这会使网页全屏打开。我希望它以一定的宽度和高度打开。现在试试我的更新代码这是可行的,但另一端的$\u POST数据没有响应$username=$\u POST['username'];echo$username;没有响应如果无法正常工作,只需在url中打开一个新选项卡即可
<form method="post" onsubmit="window.open('http://www.google.com', '_blank', 'toolbar=0,location=0,menubar=0');" >
                <input type="hidden" name="username" value="<?php echo $username; ?>"/>
                <input type="hidden" name="password" value="<?php echo $password; ?>"/>
                <input onclick="" type="submit" value="OPEN TO BATTLE.php"/>
            </form>
<form method="post" action="battle.php" onsubmit='window.open("battle.php/?width=700&height=500&toolbar=0&menubar=0&location=0&status=0&scrollbars=0&resizable=0&left=30&top=0","_blank");' >