Home > Bookmarks, Html, Web > Javascript Delay

Javascript Delay

October 21st, 2007 Leave a comment Go to comments

Cum faci delay in javascript: (adica o pauza)

In codul de mai jos, folosind functia setTimeout ,dupa 1000 de ms, scriptul va afisa mesajul: DONE

<script language=”javascript”>

function afterdelay()
{

alert(’DONE’);

}

setTimeout(’afterdelay()’,1000);

</script>

Extrem de simplu!

(ByREV)

  1. No comments yet.
  1. No trackbacks yet.
GoCache - ByREV-Cache v1.0 - live served in : 0.157562 sec (gzip)