dqyitt2954 2016-01-10 15:31
浏览 51
已采纳

多个HTML表单POST数据在新选项卡中打开

I have multiple forms on one page that get populated dynamically from a Mysql database using PHP.

Each form posts the data to a new page that allows the user to "view more details" -- this page opens in a new tab.

Here is my problem - when a user clicks on "view more details" it opens in a new tab but if they go back and select another scholarship it opens in the same tab that was already open. I want the user to be able to open multiple tabs at once for each scholarship from the page.

Here is a fiddle: https://jsfiddle.net/tcanfarotta22/x64q0597/

Here is a sample form

    <div class='list' style='width:1750px; margin:0 auto;'>
  <form action='singleview.php' method='post' target='_new'>
    <table id='scholarship' style='float:left;' align='center'>
      <thead>
        <th class='head' colspan='3' style='text-align:center;'>University of Michigan--Dearborn
          <br>
          <br>Full Tuition
          <br>
          <br>Public
          <br>
          <br>
          <input type='hidden' name='id' value='ARLUJ'>
          <input type='submit' value='View More Details'>
          <br>(Will Open in a New Tab)</th>
      </thead>
  </form>
  </table>
</div>
<div class='list' style='width:1750px; margin:0 auto;'>
  <form action='singleview.php' method='post' target='_new'>
    <table id='scholarship' style='float:left;' align='center'>
      <thead>
        <th class='head' colspan='3' style='text-align:center;'>University of Michigan--Dearborn
          <br>
          <br>$1,500
          <br>
          <br>Public
          <br>
          <br>
          <input type='hidden' name='id' value='BNAOT'>
          <input type='submit' value='View More Details'>
          <br>(Will Open in a New Tab)</th>
      </thead>
  </form>
  </table>
</div>
  • 写回答

2条回答 默认 最新

  • drzrdc1766788 2016-01-10 15:42
    关注

    When user click then change (with javascript) the target='_new' as target='_new2' and then target='_new3' ... etc.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀