jQuery选项卡未按预期显示

时间:2013-04-04 14:41:23

标签: jquery tabs

我正在使用jquery UI标签,它没有显示我的tab3内容..有时它第三个标签内容被附加到tab2内容的结尾..任何想法?我在这里是我的代码..并对不起凌乱代码...并感谢进步..

    <body>
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">My Info</a>
            </li>
            <li><a href="#tabs-2">My Member</a>
            </li>
            <li><a href="#tabs-3">My schedule</a>
            </li>
        </ul>
        <div id="tabs-1"></div>
        <div id="tabs-2">Welcome trainer1
            <br>
            <br>
            <form id="form11" name="form11" action="action2.php" method="post">
                <table border='1'>
                    <tr>
                        <td>Tick</td>
                        <td>MemberName</td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" />
                        </td>
                        <td>member1</td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" />
                        </td>
                        <td>member2</td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" />
                        </td>
                        <td>member3</td>
                    </tr>
                    <input type='submit' id='submit10' value='Add Member' />
                    <input type='submit' id='submit11' value='Delete Member' />
            </form>
            <br>
            <br>
        </div>
        <div id="tabs-3">tab 3</div>
                </div>
</body>

我发现关闭表格和一些div不合适,小提琴和mozilla中的红色标记......我检查了所有标签,但不知道我哪里出错......帮助!!!!!

2 个答案:

答案 0 :(得分:1)

在更新的信息上,您缺少关闭表格标签

</table>

答案 1 :(得分:0)

您忘记关闭表标记:

<body>
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">My Info</a>
            </li>
            <li><a href="#tabs-2">My Member</a>
            </li>
            <li><a href="#tabs-3">My schedule</a>
            </li>
        </ul>
        <div id="tabs-1"></div>
        <div id="tabs-2">Welcome trainer1
            <br>
            <br>
            <form id="form11" name="form11" action="action2.php" method="post">
                <table border='1'>
                    <tr>
                        <td>Tick</td>
                        <td>MemberName</td>
                    </tr>
                    <tr>
                        <td>
                        <input type="checkbox" />
                        </td>
                        <td>member1</td>
                    </tr>
                    <tr>
                        <td>
                        <input type="checkbox" />
                        </td>
                        <td>member2</td>
                    </tr>
                    <tr>
                        <td>
                        <input type="checkbox" />
                        </td>
                        <td>member3</td>
                    </tr>

                </table>

                <input type='submit' id='submit10' value='Add Member' />
                <input type='submit' id='submit11' value='Delete Member' />
            </form>
            <br>
            <br>
        </div>
        <div id="tabs-3">tab 3</div>
    </div>
</body>