在新窗口中打开

时间:2015-11-22 05:08:15

标签: php html

尝试使用目标属性使用标记打开新窗口但它无法正常工作。这是我的代码:

<tr>
    <td>
        <?php echo $count;?>
    </td>
    <td><a class="oiu" href=<?php echo "eventdetail.php?idno=".$row[ 'E_id'];?>><u><?php echo $row['E_name'];?></u></a>
    </td>
    <td><a class="oiu" href=<?php echo "http://maps.google.com/maps?saddr=".$cadd. "&daddr=".$vadd;?> target="_blank" ><u><?php echo $row['Venue'];?><u></a>
    </td>
    <td>
        <?php echo $row[ 'EDate']. '  '.$time;?>
    </td>
    <!-- <td><div id="remain"><?php echo "$days, $hours:$minutes:$seconds";?></div></td> -->
    <td> <a class="icon1" href=<?php echo "update.php?idno=".$eid;?>><span class="glyphicon glyphicon-pencil pencil"></span></a><a class="icon2" href="#myModal2" data-toggle="modal"><span class="glyphicon glyphicon-trash trash"></span></a>
    </td>
</tr>
<?php $count++;

1 个答案:

答案 0 :(得分:0)

首先使用target="_blank",然后按照下面的说明提供href="link"并关闭下划线标记</u>

请尝试以下代码:

<tr>
<td><?php echo $count;?></td>
<td ><a class="oiu" href=<?php echo "eventdetail.php?idno=".$row['E_id'];?>><u><?php echo $row['E_name'];?></u></a></td>
<td><a class="oiu" target="_blank" href=<?php echo "http://maps.google.com/maps?saddr=".$cadd."&daddr=".$vadd;?>  ><u><?php echo $row['Venue'];?></u></a></td>
        <td><?php echo $row['EDate'].'  '.$time;?></td>
        <!-- <td><div id="remain"><?php echo "$days, $hours:$minutes:$seconds";?></div></td> -->
        <td> <a class="icon1" href=<?php echo "update.php?idno=".$eid;?>><span class="glyphicon glyphicon-pencil pencil"></span></a><a class="icon2" href="#myModal2" data-toggle="modal"><span class="glyphicon glyphicon-trash trash"></span></a></td>
    </tr>