事件处理程序javascript

时间:2009-02-03 22:41:23

标签: events handlers

我有一些处理程序来调整框的大小,我想根据所选的句柄移动框。在循环中实现这个的最佳方法是什么

for (var j = 0; j < allhand.length; j++) {
    aaa[allhand[j]].style.visibility = 'inherit'; 

    aaa[allhand[j]].onmousedown = function(e) {

        document.onmousemove = function(e) {
            // if bottom handle it's been moved then just inc height

            // if right handle it's been moved then just inc width... ?????

            // etc...
            return false;
        };
        document.onmouseup = function(e) {
            stop = false;
            return false;
        };
        return false;
    };
}

1 个答案:

答案 0 :(得分:0)

没有快速回答,但在Flex中我使用Rogue Development's Object Handles运气好..也许得到代码,看一看?