javascript - IE10 only given me an 'Unable to evaluate expression' error when changing style -


i have following javascript function hide html tag:

function object_hide_obj(objectid) {      var objname=document.getelementbyid(objectid);     if (objname) {         objname.style.display = "none";     } } 

i have instance objname valid html <tr> tag. in ie10 (works fine on ie9, ie11, chrome, , safari) weird error on objname.style.display = "none";. when try evaluate in console 'unable evaluate expression' error, , the browser crashes when reaches line. if debug, doesn't happen. know why?

its bug in ie10 try install update kb2884101 first

function object_hide_obj(objectid) { var objname=document.getelementbyid(objectid); if (objname) {     objname.style.display = "none"; } 

}

blockquote

place html5 tag start of page , try

      <!doctype html>       <table>         <tr id="id0">             <td>                 line 0                 <input type="button" onclick="object_hide_obj('id1')" value="hide line 1">             </td>         </tr>         <tr id="id1">             <td>                 line 1             </td>         </tr> 

best of luck


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -