![]() |
for loop help
I'm working on a random project that takes a lot of code so I'm trying to use javascript to make it easier.
This is what I want to do. Code:
else if(x.className=="change0") {Code:
<!DOCTYPE html>Code:
else if(x.className=="change0") { |
Oh my, what a construct. Ever heard of variables holding numbers and string concatenation?
The only thing you want to do is to count +1 for the class name of a certain DOM element? Which DOM element is "x" referring to?? Code:
// get your element |
That code just makes no sense at all.
As written, you will be simply dumping what LOOKS like JavaScript AS TEXT into the contents of your <div id="demo">. Total nonsense. |
| All times are GMT +1. The time now is 02:02 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.