Take the 2-minute tour ×

I want to implement a timer in DOM but I don't want to use any Javascript. Is this actually possible?

I already have the code in Javascript but I would like to change it to DOM so that I don't have to activate JS.

Thanks for any help :D

share|improve this question
What do you mean "change it to DOM"? Is it a homework? –  Sergio Tulentsev Mar 11 '12 at 21:24
"I don't want to use any Javascript" & "I already have the code in Javascript" This doesn't make any sense. Please post the code you have... –  Teemu Mar 11 '12 at 21:30
Switch to another programming language - thats the only option you have. The DOM isn't a programming language. –  Saxoier Mar 11 '12 at 21:34

1 Answer 1

up vote 1 down vote accepted

The only way to reliably modify the Document Object Model is with JavaScript. DOM is just a structure for accessing parts of a webpage, nothing more.

So unless you have a vendetta against JavaScript and would rather using something like client side VBscript (IE only) you have to use JavaScript.

If you just want to get a similar effect you could try playing with CSS pseudo-elements which I doubt will cover your needs. Also CSS pseudo-elements aren't really part of the page so there are quirks; pseudo-element text cannot be selected for example.

In short, you must use JavaScript to "use" DOM, its a structure, not a language.

share|improve this answer
Thank you. That was the answer I thought which would come up. I'm not very good with Javascript but the problem is that I have to make a webpage useable without Javascript and I need the countdown timer. –  Fabio Oesch Mar 11 '12 at 21:47
You can use flash, but that wouldn't make any sense given your argument of having JavaScript enabled. People who disable JavaScript, probably won't have Flash enabled. Since HTML is static i'd strongly advice you to use JavaScript for such a task. You could warn your users that they have to enable JavaScript with the <noscript> tag –  Saebekassebil Mar 11 '12 at 21:54
@Saebekassebil I don't know of how flash can modify the DOM. Or are you saying instead of DOM altogether? –  Hawken Mar 11 '12 at 21:55
Instead of DOM altogether, but again I don't recommend it, when it can so easily be achieved with JavaScript. –  Saebekassebil Mar 12 '12 at 13:26

Your Answer


