以->箭移动换行时跳过以上所写的image或disbled或readonly,现在以上的都可以成功,只有readonly型的,不能跳过

解决方案 »

  1.   

    你先输出input中readOnly及其他属性值和别的标签属性有什么不同,在定
      

  2.   

    <script>
    function func_key_down()
    {
    var src_obj = window.event.srcElement;
    if (window.event.keyCode == 39)
    {    
    if (src_obj.type != "image"
    && src_obj.disabled != 1
    && src_obj.readOnly != 1
    && src_obj.tagName != "A"
    && src_obj.tagName != "TEXTAREA")
    {
    window.event.keyCode = 9;
    }
    }
    }
    window.document.onkeydown = func_key_down;
    </script><form>
    <input type=text >
    <input type=text disabled>
    <input type=text >
    <input type=text readonly>
    <input type=text >
    </form>源码如上,以键盘右键键头换行,遇disabled,readonly的跳过,disabled但readonly不能跳过,请各位帮忙