在IE11上,日历功能未被禁用 [英] On IE11, Calendar functionality is not getting disabled

查看:103
本文介绍了在IE11上,日历功能未被禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi,

I am using Internet explorer version 11 and an asp.net v4.0 web application. We have the below HTML code to place a calendar image on the web page. It has an onclick event which launches a calendar where user can select a date.




<TD class="tblCellClass" id="tblCellDt" width="24%" runat="server"><A title="Calendar" style="CURSOR: hand" onclick="javascript:void(DOSomething())"><IMG src="SampleImages/Calendar.gif" border="0" width="20" height="20"></A></TD>

Under certain situations, we disable this onclick functionality by disabling the td class "tblCellDt" in javascript as well as in code-behind.

This is how we are disabling in javascript:

document.all.tblCellDt.disabled = true;

and similary in code-behind vb.net file:

tblCellDt.Disabled = True

For some reasons, onclick functionality is getting disabled on Internet Explorere 8 but not on Internet explorer 11. Can you please help ?

推荐答案

document.all非常老,不是浏览器因此可能是IE终于停止支持它了。改为使用document.getElementById



document.all is very very old and not a browser standard so it could be that IE has finally stopped supporting it. Use document.getElementById instead

document.getElementById("tblCellDt").disabled = true;





http://www.w3schools.com/jsref/prop_html_disabled.asp [ ^ ]


这篇关于在IE11上,日历功能未被禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆