dtr32221 2014-03-28 19:54
浏览 30

目标在Echoed php链接

I have a problem I can't solve by myself, don't know how simple it is to solve but I want to open this link in another frame:

<?php echo "<a href=details.php?id=$row[idProdukt]>$row[Produkt_Namn]</a>" ?>

tried to use taget but since it's html I couldn't really wrap my head around how to type it. any help is greatly appreciated.

  • 写回答

3条回答 默认 最新

  • douhuiqi3855 2014-03-28 19:56
    关注

    Just add the attribute to your anchor tag as usual. Make sure you use the name of the targeted iframe as its value:

    <?php echo "<a href='details.php?id=$row[idProdukt]' target='framename'>$row[Produkt_Namn]</a>" ?>
    

    I added quotes around your html attribute values as that is a good practice to be in. It prevents issues arising from errant or intentional spaces in attribute values.

    评论

报告相同问题?

悬赏问题

  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大