javascript - IE can't handle jquery something.checked -


the following coffeescript code works read checkbox in several browsers, not in ie:

if something.checked 

html:

      <input type="checkbox" name="something" id="something" > 

with ie, get

something undefined 

having element named "something" not magically bind javascript. need create event handler first.

document.getelementbyid('something').onclick = function(element) {     ...your code ... }) 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -