Toggle display of clock by a button using Jquery

We have seen how to display a real time clock in JavaScript in Part 1. Now we will try to manage the display of the clock by controlling it through a button using JQuery.

Here is the demo

Here is the code.

<script src="//">
<script type="text/javascript">

function display_c(){
var refresh=1000; // Refresh rate in milli seconds

function display_ct() {
var strcount
var x = new Date()
document.getElementById('ct').innerHTML = x;

<body onload=display_ct();>

<span id='ct' ></span>

Post your comments , suggestion , error , requirements etc here .

We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 All rights reserved worldwide Privacy Policy Disclaimer