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 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分