lszanto Posted April 20, 2007 Share Posted April 20, 2007 I just need a simple script to hide some divs in an array this is what I got so far but I dunno why it doesn't work, can anybody help? function closeImg() { var num = new Array("one", "two"); var length = num.length; for(i = 0; i < length; i++) { var id = num[i]; document.getElementById(id).style.display = 'none'; } } Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.