【发布时间】:2014-09-17 22:15:30
【问题描述】:
These solutions(复制在下面)不起作用,因为输入的value 是预设的,需要水平滚动..绝对定位的 div 覆盖输入并阻止它滚动..
<span style="position:relative;">
<input type="text" disabled />
<div id="textInput" style="position:absolute; left:0; right:0; top:0; bottom:0; cursor: pointer;" ></div>
</span>
document.getElementById("textInput").onclick = function() {
alert("Input clicked");
}
在保持输入滚动的同时启用事件有什么建议吗?
【问题讨论】:
标签: css input disabled-input