dongtuji0992 2016-02-15 15:48
浏览 46
已采纳

HTML表格中的`iframe`

I am displaying some data from a database into my cms, using tables (tr, td).

   <tr align="center">
        <td><?php echo $i++; ?></td>
        <td><?php echo $post_image; ?></td>
        <td><?php echo $post_title; ?></td>
        <td>
            <iframe width="100px" frameborder="0" id='inneriframe' scrolling=yes >
                <?php echo $post_description; ?>
            </iframe>
        </td>
        <td><a href="index.php?edit_football_news=<?php echo $post_id; ?>">Edit</a></td>
        <td><a href="includes/delete_football_news.php?delete_football_news=<?php echo $post_id; ?>">Delete</a></td>
    </tr>

Unfortunately the description php variable is not displayed at all inside my iframe. However, if I take out the iframe tag, everything works fine, and I can see all the stored values from the database.

<tr align="center">
        <td><?php echo $i++; ?></td>
        <td><?php echo $post_image; ?></td>
        <td><?php echo $post_title; ?></td>
        <td><?php echo $post_description; ?></td>

        <td><a href="index.php?edit_football_news=<?php echo $post_id; ?>">Edit</a></td>
        <td><a href="includes/delete_football_news.php?delete_football_news=<?php echo $post_id; ?>">Delete</a></td>
    </tr>

So my main question is how to use iframes inside tds?

  • 写回答

2条回答 默认 最新

  • dtng25909 2016-02-15 15:50
    关注

    iframe elements load external documents; the HTML that goes between their start and end tags is alternative content for browsers which do not support iframes.

    If you want a scrolling area on a page, apply the CSS overflow property to an appropriate element (probably a div in this case).

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

报告相同问题?

悬赏问题

  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元