多个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>
我在一个页面上有多个表单,可以使用PHP从Mysql数据库动态填充。 p>
每个表单都会将数据发布到允许用户“查看更多详细信息”的新页面 - 此页面将在新选项卡中打开。 p>
这是我的问题 - 当用户点击“查看更多详细信息”时,它会在新标签中打开,但如果他们返回并选择其他奖学金,则会在已经显示的相同标签中打开 打开。 我希望用户能够从页面上为每个奖学金一次打开多个标签。 p>
这是一个小提琴: https://jsfiddle.net/tcanfarotta22/ x64q0597 / p>
下面是一个示例表格 p>
&lt; div class ='list'style ='width:1750px ; margin:0 auto;'&gt;
&lt; form action ='singleview.php'method ='post'target ='_ new'&gt;
&lt; table id ='scholarship'style ='float:left;' align ='center'&gt;
&lt; thead&gt;
&lt; th class ='head'colspan ='3'style ='text-align:center;'&gt;密歇根大学 - 迪尔伯恩
&lt; br&gt;
&lt; br&gt;完全学费
&lt; br&gt;
&lt; br&gt;公开
&lt; br&gt;
&lt; br&gt;
&lt; input type ='hidden'name ='id' value ='ARLUJ'&gt;
&lt; input type ='submit'value ='查看更多详细信息'&gt;
&lt; br&gt;(将在新标签页中打开)&lt; / th&gt;
&lt; / thead&gt;
&lt; / form&gt;
&lt; / table&gt;
&lt; / div&gt;
&lt; div class ='list'style ='width:1750px; margin:0 auto;'&gt;
&lt; form action ='singleview.php'method ='post'target ='_ new'&gt;
&lt; table id ='scholarship'style ='float:left;' align ='center'&gt;
&lt; thead&gt;
&lt; th class ='head'colspan ='3'style ='text-align:center;'&gt;密歇根大学 - 迪尔伯恩
&lt; br&gt;
&lt; br&gt; $ 1,500
&lt; br&gt;
&lt; br&gt;公开
&lt; br&gt;
&lt; br&gt;
&lt;输入类型='隐藏'name ='id'值 ='BNAOT'&gt;
&lt;输入类型='提交'值='查看更多详细信息'&gt;
&lt; br&gt;(将在新标签页中打开)&lt; / th&gt;
&lt; / thead&gt ;
&lt; / form&gt;
&lt; / table&gt;
&lt; / div&gt;
code> pre>
div>
When user click then change (with javascript) the target='_new'
as target='_new2'
and then target='_new3'
... etc.
Just put target='_blank' instead of "_new".