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