" , IE",
- IE , !
The fact that not all display styles work for all browsers, you just need to try each of them to find out which one works for your browser, or you should even enable testing that your application’s browser works in your code.
!
See below for example: javascript ".display = 'inline" only works for IE 8 and above.
<script type="text/javascript">
function f_ToggleCheck(sender, rowN, obj2) {
if (sender.checked) {
sender.value = "checked";
obj2[rowN].style.display = "inline";
} else {
sender.value = "";
obj2[rowN].style.display = "none";
}
alert(obj2[rowN].style.display);
}
</script>
<table>
<tr>
<td>
<input name="R_CheckValue" type="checkbox" onclick="f_ToggleCheck(this, 2, R_DateValue)" value="checked" checked="" />
<input name="R_DateValue" value="2015-05-30" style="display: inherit" size="7" />
</td>
</tr>
</table>
source
share