Jump to content

setInterval()


shadowayex

Recommended Posts

Ok. I'm trying to use setInterval() to make a chat box. But I didn't really know how to work it. So I tried to make a simple example. It looks like this:

<html><head><title>Test</title><script type="text/javascript>setInterval("count()",1000)var time=1;function count(){ document.getElementById("test").innerHTML = ++t;}</script></head><body><div class="test"></div></body></html>

It doesn't work. What am I doing wrong?

Link to comment
Share on other sites

<script type="text/javascript>

No closing quote.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...