zoukankan      html  css  js  c++  java
  • tab 下一个

    function NextTd(e, o) {
    var crevent = e || window.event;

    if (crevent.keyCode == 9) {
    if (currrentTD != "") {
    var jqueryTd = $(currrentTD);
    var curNext = null;
    if (jqueryTd.next("td").length > 0 && jqueryTd.next("td").next("td").length > 0 && jqueryTd.next("td").next("td").next("td").length > 0) {
    curNext = jqueryTd.next("td"); //.click();
    if (curNext.text() == "-" && curNext.next("td").length > 0) {
    curNext = curNext.next("td");
    }
    } else {
    if (jqueryTd.closest("tr").next("tr").length > 0) {
    curNext=jqueryTd.closest("tr").next("tr").children('td').eq(1);
    }
    }
    if (curNext != null) {
    try {

    if (!isIE()) {
    o.blur();
    } else {
    $(o).blur()
    }
    } catch (ex)
    { }
    setTimeout(function() {
    curNext.click();
    }, 1);

    return false;
    } else {
    try {

    if (!isIE()) {
    o.blur();
    } else {
    $(o).blur()
    }
    } catch (ex)
    { }
    }
    }
    }
    }

    function isIE() { //ie?
    var Sys = {};
    var ua = navigator.userAgent.toLowerCase();
    var s;
    (s = ua.match(/rv:([d.]+)) like gecko/)) ? Sys.ie = s[1] :
    (s = ua.match(/msie ([d.]+)/)) ? Sys.ie = s[1] :
    (s = ua.match(/firefox/([d.]+)/)) ? Sys.firefox = s[1] :
    (s = ua.match(/chrome/([d.]+)/)) ? Sys.chrome = s[1] :
    (s = ua.match(/opera.([d.]+)/)) ? Sys.opera = s[1] :
    (s = ua.match(/version/([d.]+).*safari/)) ? Sys.safari = s[1] : 0;

    if (Sys.ie)
    return true;
    return false;
    }

  • 相关阅读:
    AS400小结(2)
    java循环链表
    RPG程序中一些小结
    学习AS400心得体会
    Vue学习二
    Vue学习一
    VC视图的多页打印(转)
    MFC对象拖拽功能(不只是文件拖拽)(转)
    Silverlight如何显示、输入上标和下标?
    【2011】Google Maps API3
  • 原文地址:https://www.cnblogs.com/yangfeizbj/p/5280494.html
Copyright © 2011-2022 走看看