HTML,是否有其他的方式来解决只读不是在IE 8和IE 9的工作,为什么readonly在IE 8和IE 9中不起作用?
这里是我的代码,
<input
size="15"
type="text"
name="oldValueMonthlyLimit"
id="oldValueMonthlyLimit"
readonly =true
value="<%=oldValueMonthlyLimit%>">
HTML,是否有其他的方式来解决只读不是在IE 8和IE 9的工作,为什么readonly在IE 8和IE 9中不起作用?
这里是我的代码,
<input
size="15"
type="text"
name="oldValueMonthlyLimit"
id="oldValueMonthlyLimit"
readonly =true
value="<%=oldValueMonthlyLimit%>">
试试这个:
<input type="text" onfocus="this.blur()" readonly="" >
而且在CSS中,把这个做了悬停在输入光标不会改变。
cursor: inherit;
cursor:inherit;不总是工作。使用cursor:default;适合更多我认为。 –
'disabled'输入元素用于防止提交其值。
'只读' 输入元件不会在IE 8,9,10或11。
在这种情况下,我们可以使用的onkeydown =工作 “的javascript:返回false;”用于保护(禁用)输入元素并以表单数据的形式接收其值
您没有正确使用它。 http://www.w3schools.com/tags/att_input_readonly.asp – Vucko
@Vucko仍然没有工作,任何其他解决方案 – ELAYARAJA
是值=“<%= oldValueMonthlyLimit%>”工作? – Vucko