robert_gsfame Posted April 30, 2010 Share Posted April 30, 2010 I try to use .style.display to check whether the style.display is none, but it didnt work how can i check the style display if(document.getElementById("a").style.display=="none){ alert("none")} Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted April 30, 2010 Share Posted April 30, 2010 I try to use .style.display to check whether the style.display is none, but it didnt work how can i check the style display if(document.getElementById("a").style.display=="none){ alert("none")} It should work. Show where your JavaScript is in relation to your HTML. Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted April 30, 2010 Share Posted April 30, 2010 No; it shouldn't work. There is a missing parenthesis. Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted April 30, 2010 Share Posted April 30, 2010 No; it shouldn't work. There is a missing parenthesis. Actually, it's a missing quote. And I assumed it was a typo that the OP made from not simply copying his code, but rather rewriting it here in a hurry. 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.