哪些jQuery命令用于在html中插入脚本标签(包含计数器定时器)

Which jQuery commands to use for inserting script tag (that contains counter timer) inside html?

本文关键字:标签 包含 计数器 定时器 脚本 插入 命令 jQuery 用于 html 哪些      更新时间:2023-09-26

我想添加计时器脚本,使用jQuery。就在id="counter"段落之后所以不用这段代码:

<body>
<p> beginning of site</p>
<table id="timer_table">
    <tbody>
        <tr>
            <td>
                <p id="counter"  style="color: red;"> Here's the counter: </p>
            </td>
        </tr>
    </tbody>
</table>
<p> rest of site...</p>
</body>

我将得到这个代码:

<body>
<p> beginning of site</p>
<table id="timer_table">
    <tbody>
        <tr>
            <td>
                <p id="counter"  style="color: red;"> Here's the counter: </p>
                <script>
                    var myCountdown1 = new Countdown({time:316});
                </script>
            </td>
        </tr>
    </tbody>
</table>
<p> rest of site...</p>
</body>

我通过使用firebug控制台来做到这一点,我正在运行这个:(如Can't append

相关文章: