![]() |
|
Javascript php - Printable Version +- HN-Community (https://hacker-newbie.org) +-- Forum: Miscellaneous (https://hacker-newbie.org/forum-86.html) +--- Forum: Coding/Programing (https://hacker-newbie.org/forum-19.html) +---- Forum: Web Programing (https://hacker-newbie.org/forum-38.html) +---- Thread: Javascript php (/thread-12762.html) |
Javascript php - adecakep7 - 03-04-2012 iseng-iseng saya pulang les hari ini mencoba otak-atik javascript yang dapat berjalan dihtml.. kali ini saya akan membahas tentang timer atau waktu yang ada pada html dalam hitungan detik, Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Javascript Timer</title> <script type="text/javascript"> var number = 1; function start_timer() { window.setTimeout('timer_tick()', 1000); } function timer_tick() { document.getElementById('id_a').value = number; if (number > 10000) {/* max 1000 */ number = 0; } number++; window.setTimeout('timer_tick()', 1000); } </script> </head> <body onload="start_timer()"> Second Adecakep7<br /> <input type="text" id="id_a" value="INIT" readonly="readonly" /> </body> </html> mungkin bisa dibuat lebih mimalis oleh anda-anda semua. RE: Javascript php - aandoni - 03-05-2012 nice share dh om..... ajib.. keeppppp spiiritt RE: Javascript php - adecakep7 - 03-05-2012 (03-05-2012, 01:21 AM)aandoni Wrote: nice share dh om..... silahkan dioprak-aprik kaks.. RE: Javascript php - after01 - 03-05-2012 (03-05-2012, 02:20 AM)adecakep7 Wrote:(03-05-2012, 01:21 AM)aandoni Wrote: nice share dh om..... mantap banget om... nice job dah!!!! RE: Javascript php - sky_oot - 03-14-2012 mantab mas bro ... mantab banget dagh ... |