蓝狐的技术思考 BlueFox Thinking in Tech...
交流,分享,探讨技术...... Communication, Sharing, and Discussion about Technology.....

导航

 
//设置下一个焦点
        function SetNextFocus(tb)
        {
            var rowsCount = document.getElementById("txtRowsCount").value;
 
            if(event.keyCode == 13)
            {
                if(rowsCount<10)
                {
                    var oldnum = tb.id.substr(17,1);
                    if(oldnum < rowsCount -1)
                    {
                        var newnum = parseInt(oldnum) + parseInt("1");
                        document.getElementById("rptMonthPlan_ctl0" + newnum + "_txtMark").focus();
                    }
                    if(oldnum==rowsCount-1)
                    {
                        document.getElementById("tdMyScore").focus();
                    }
             
                }
                else
                {
                    var oldnum = tb.id.substr(17,2);
                    if(oldnum < rowsCount)
                    {
                        var newnum = parseInt(oldnum) + parseInt("1");
                        document.getElementById("rptMonthPlan_ctl" + newnum + "_txtMark").focus();
                    }
                    if(oldnum==rowsCount-1)
                    {
                        document.getElementById("tdMyScore").focus();
                    }
                } 
            }
        }
posted on 2007-04-04 12:01  蓝狐  阅读(387)  评论(0编辑  收藏  举报