如何在较小尺寸的屏幕中间以单独的 html 形式获取 php 文件的输出


How to get output of a php file in separate html form at the middle of screen of lesser size

如何在较小尺寸的屏幕中间以单独的html形式获取php文件的输出。请参阅以下部分。它不起作用。帮助

 <html>
 <head>
   <script type="text/javascript">
  //This function auto-fills fields the form 'qform' and auto submits.
  function datcal(subnm, chpno, qsnno) 
  {     
  document.qform.subnm1.value = subnm;
  document.qform.chpno1.value = chpno;
  document.qform.qnumber1.value = qsnno;
  document.getElementById("qform").submit();
}
  //calling the function with some data
  datcal('chem11','1','2');
  </script>
 </head>  
 <body>

  <form>
    <!-- This is the other part of form here.....-->
   </form>

     <!-- I want to get the out put of below form at center of screen separately -->
    <form id = "qform" name="qform" action="getques.php" style="visibility:hidden"     
      method="post" target="_blank">
   <input type="text" name="subnm1" ><br>
   <input type="text" name="chpno1" ><br>
   <input type="text" name="qnumber1" ><br>
   <input type="submit">
   </form> 


   </body>
    </html>

上面的代码正在打开一个新窗口,但我希望该窗口的大小不是全屏而是更小。怎么做?

如果我理解你的问题,最简单的方法是打开创建一个将所有这些参数作为查询字符串的页面。然后,您可以通过将其设置为超链接来在窗口中打开新页面。新页面还可以通过从查询字符串中获取所有这些参数来处理您的输入。

<script language ="javascript"> 
    function submitForm(){
        var url = "http://www.newpage.php?subnm1="+value1+"chpno1="+value2 //and like this
        window.open (url, "acb", "status=no, width=960, height=700")
   } 
</script>

<a href="#" onclick="submitForm()">Submit</a>