如何显示

时间:2016-06-05 15:25:17

标签: javascript jquery html

有人可以帮我解决这个问题吗? 我在w3schools用javascript游戏,身体有载物,我有一张桌子需要把它放进去

            <table>
            <tr>
                <th><h4>Cookie clicker </h4></th>
                <th><h4>Sport Heads Football Championship</h4></th>
                <th><h4>Slither.io</h4></th>
                <th><h4>Game</h4></th>
            </tr>
            <tr>
                <th>
                    <a href="http://orteil.dashnet.org/cookieclicker/"><img src="pictures/cookie.jpg" alt="cookieclicker" height="450" width="450"></a>
                </th>


                <th>
                    <a href="http://www.webgames.cz/sports-heads-football-championship/4295-0/"><img src="pictures/sportheads.jpg" height="450" width="450"></a>
                </th>
                <th>
                    <a href="http://www.slither.io"><img src="pictures/slither.jpg" height="450" width="450"></a>
                </th>
                <th id="table">
                </th>
            </tr>
        </table>

这是该表,这是

            <script>
            window.onload = function () {
                document.getElementById('table');
                startGame();
            };
            </script>

游戏在表格中位于页面顶部。有人可以解决吗?我真的不知道怎么做。 This is the pic where is a game

1 个答案:

答案 0 :(得分:0)

<th>是表头元素......

使用<td>元素,它是表格单元格元素。 (它的表数据)

由于<th>是标题元素,因此在某些实现中它可能会忽略或覆盖<tr>元素。

您可以详细了解here