在 IE10onkeyup
中,只有双击元素才能对元素起作用(仅元素处于焦点中)
在 FF 和 Chrome 中它可以工作。
出了什么问题,我该如何解决?
<script>
// this works
document.getElementById('ContractNumber').onmousedown = function () {
validateContractNumber(this);
};
// this not fired until i do double click
document.getElementById('ContractNumber').onkeyup = function () {
validateContractNumber(this);
};
</script>
<style>
input[type=text]
{
....
/*focus also doesn't work until double click this field*/
&:focus
{
border: @Text-Focus;
background-color: @Text-Focus-Back;
}
}
</style>
<!--jquery dialog-->
<div id="dlgEditClient" style="display: none;">
<div class="td editor-field left" title="Edit contract number for client">
<input type="text" value="" name="ContractNumber" id="ContractNumber">
</div>
.............
</div>