Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,152,383 members, 7,815,812 topics. Date: Thursday, 02 May 2024 at 06:47 PM |
Nairaland Forum / Science/Technology / Programming / Help On This Simple Script (733 Views)
Allow Me To Ask You This Simple Question About Your Business / Help A Java Newbie With This Simple Java Program / Help On This Simple Script (2) (3) (4)
(1) (Reply)
Help On This Simple Script by Setag: 6:21pm On Aug 15, 2015 |
Function count() {
var lbl= document.getElementById('lbl');
for (i=0; i<10; i++) {
lbl.innnerHTML+= i+'<br>';
}
} the tags specifically: <button type='button' onclick='count()'>start counting </button> <div id='output'></div> i keep getting the this error on IE: unable to get property 'innerHTML' of undefined or null reference. Kinda fix this and explain.. Re: dhtml |
Re: Help On This Simple Script by hollyfat(m): 9:54pm On Aug 16, 2015 |
Setag: The problem is that there is no tag with id lbl. you can try this out function count() { var output= document.getElementById('output'); for (i=0; i<10; i++) { output.innnerHTML+= i+'<br>'; } } <button type='button' onclick='count()'>start counting </button> <div id='output'></div> The div tag with the output attribute(<div id='output'></div> will contain the loop results |
Re: Help On This Simple Script by Kensharval(m): 8:59pm On Aug 18, 2015 |
If you wish to have a professional shared
hosting quality in a free hosting package, come
and host with 000webhost.com and
experience the best service you can get
absolutely free.
Founded in December 2006, 000webhost.com
has a trusted free hosting members base of
over 60,000 members and still counting!
Offering professional quality hosting, support,
uptime and reliability, we have a great
community of webmasters, you'd love to be a
part of!
Register now and get it all free:
*** 1500 MB of disk space
*** 100 GB of data transfer
*** PHP and MySQL support with no
restrictions
*** cPanel control panel
*** Website Builder
*** Absolutely no advertising!
Join us now: http://
www.000webhost.com/876430.html |
(1) (Reply)
Arduino Microcontroller Board Thread / Java Learner / Web Host
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9 |