• <legend id='XzMCd'><style id='XzMCd'><dir id='XzMCd'><q id='XzMCd'></q></dir></style></legend>
    • <bdo id='XzMCd'></bdo><ul id='XzMCd'></ul>

        <tfoot id='XzMCd'></tfoot>

        <small id='XzMCd'></small><noframes id='XzMCd'>

      1. <i id='XzMCd'><tr id='XzMCd'><dt id='XzMCd'><q id='XzMCd'><span id='XzMCd'><b id='XzMCd'><form id='XzMCd'><ins id='XzMCd'></ins><ul id='XzMCd'></ul><sub id='XzMCd'></sub></form><legend id='XzMCd'></legend><bdo id='XzMCd'><pre id='XzMCd'><center id='XzMCd'></center></pre></bdo></b><th id='XzMCd'></th></span></q></dt></tr></i><div id='XzMCd'><tfoot id='XzMCd'></tfoot><dl id='XzMCd'><fieldset id='XzMCd'></fieldset></dl></div>

      2. 我想打开一个新标签而不是弹出窗口

        时间:2023-12-02
              <bdo id='R2nQB'></bdo><ul id='R2nQB'></ul>

              <small id='R2nQB'></small><noframes id='R2nQB'>

                1. <tfoot id='R2nQB'></tfoot>
                  <i id='R2nQB'><tr id='R2nQB'><dt id='R2nQB'><q id='R2nQB'><span id='R2nQB'><b id='R2nQB'><form id='R2nQB'><ins id='R2nQB'></ins><ul id='R2nQB'></ul><sub id='R2nQB'></sub></form><legend id='R2nQB'></legend><bdo id='R2nQB'><pre id='R2nQB'><center id='R2nQB'></center></pre></bdo></b><th id='R2nQB'></th></span></q></dt></tr></i><div id='R2nQB'><tfoot id='R2nQB'></tfoot><dl id='R2nQB'><fieldset id='R2nQB'></fieldset></dl></div>
                2. <legend id='R2nQB'><style id='R2nQB'><dir id='R2nQB'><q id='R2nQB'></q></dir></style></legend>
                    <tbody id='R2nQB'></tbody>

                3. 本文介绍了我想打开一个新标签而不是弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试打开一个新标签.但是 Window.open() 正在打开弹出窗口.

                  I am trying to open a new tab. But Window.open() is opening up popup window.

                  我想在新标签页中打开 hello.php 文件.但它正在一个新的弹出窗口中打开.

                  I want to open hello.php file in a new tab. But it is opening up in a new popup window.

                  <!DOCTYPE html>
                  <html>
                  <head>
                  <script language="javascript">
                  
                  document.onmousedown=disableclick;
                  //status="Right Click Disabled";
                  
                  function disableclick(event)
                  {
                    if(event.button==2)
                     {
                       //alert(status);
                       return false;    
                     }
                  }
                  </script>
                  </head>
                  <body oncontextmenu="return false">
                  
                  <form action="" method="POST" oncontextmenu="return false">
                  
                  
                  
                  <b>Enter Username:</b><input type="text" name="username" value=""/><br>
                  
                  <b>Enter Password: </b><input type="password" name="password" value=""/><br>
                  
                  <input type="submit" value="submit" name="submit"/>
                  <input type="reset" value="reset" name="reset"/>
                  
                  </form>
                  
                  <?php
                  
                  
                  if (isset($_POST['submit'])) 
                  {
                  
                  $username=$_POST['username'];
                  $password=$_POST['password'];
                  
                  mysql_connect("localhost", "root", "") or die(mysql_error()); 
                  
                  mysql_select_db("demo") or die(mysql_error()); 
                  
                  $result=mysql_query("select * from employees where name='$username' and pass='$password'") 
                   or die(mysql_error()); 
                  
                  
                  if(mysql_num_rows($result)==0)
                  {
                  print "<br/>";
                  print "<b>Incorrect Username/Password!!!</b>";
                  }
                  else
                  {
                  
                  
                  mysql_query("Create table $username(Question_No varchar(10),Selected_Answer varchar(10))") 
                   or die(mysql_error());  
                  
                  
                  print "<br/>";
                  print "<b>Login successful!!!</b><br/><br/>";
                  
                  
                  print "<script>window.open('hello.php?username=$username')</script>";
                  
                  
                  print "<script>window.close('userdetails.php')</script>";
                  }
                  
                  }
                  ?>
                  
                  </body>
                  </html>
                  

                  推荐答案

                  如果可能是关于覆盖函数的 javascript 问题,请这样做:

                  In case it could be a javascript issue about override functions, do that:

                  <script>
                  (function(window, undefined){
                      var win = window.open('your_url', '_blank');
                      win.focus();
                  })(window);
                  </script>
                  

                  这应该使您无法在函数(窗口,未定义)包装器之外使用其他 javascript 代码中的函数-

                  That should make you can't use functions from other javascript code out of your function(window, undefined) wrapper-

                  这篇关于我想打开一个新标签而不是弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用 php 或 javascript 获取所有浏览器中当前打开的选项卡的 url? 下一篇:如何使用 PHPExcel 加入 Excel 文档?

                  相关文章

                  <i id='lxxx9'><tr id='lxxx9'><dt id='lxxx9'><q id='lxxx9'><span id='lxxx9'><b id='lxxx9'><form id='lxxx9'><ins id='lxxx9'></ins><ul id='lxxx9'></ul><sub id='lxxx9'></sub></form><legend id='lxxx9'></legend><bdo id='lxxx9'><pre id='lxxx9'><center id='lxxx9'></center></pre></bdo></b><th id='lxxx9'></th></span></q></dt></tr></i><div id='lxxx9'><tfoot id='lxxx9'></tfoot><dl id='lxxx9'><fieldset id='lxxx9'></fieldset></dl></div>
                  <tfoot id='lxxx9'></tfoot>
                    <bdo id='lxxx9'></bdo><ul id='lxxx9'></ul>
                    <legend id='lxxx9'><style id='lxxx9'><dir id='lxxx9'><q id='lxxx9'></q></dir></style></legend>
                  1. <small id='lxxx9'></small><noframes id='lxxx9'>