我想添加计时器脚本,使用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