⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dragpanel.aspx

📁 AJAX 应用 实现页面的无刷新
💻 ASPX
📖 第 1 页 / 共 3 页
字号:
        // Validate that the panel has moved down from its original location
        function checkHasMovedVertical(position) {
            return function() {
                testHarness.assertNotEqual(panel.offsetTop, position, 'Top of panel has not moved from position ' + position);
            };
        }

        // Validate that the panel has moved right from its original location
        function checkHasMovedHorizontal(position) {
            return function() {
                testHarness.assertNotEqual(panel.offsetLeft, position, 'Left side of panel has not moved from position ' + position);
            };
        }

        // Validate that the panel has moved from the specified location
        function checkHasMoved(top, left) {
            return function() {
                checkHasMovedVertical(top);
                checkHasMovedHorizontal(left);
            };
        }

        // Fire an onmousedown event at point (x,y)
        function mouseDown(element, x, y) {
            return function() {
                var e = testHarness.getDocument().createEvent('MouseEvents');
                e.initMouseEvent('mousedown', true, false, window, 0, x, y, x, y, false, false, false, false, 0, null);
                element.dispatchEvent(e);
            };
        }

        // Fire an onmousemove event ending at point (x,y)
        function mouseMove(element, x, y) {
            return function() {
                var e = testHarness.getDocument().createEvent('MouseEvents');
                e.initMouseEvent('mousemove', true, false, window, 0, x, y, x, y, false, false, false, false, 0, null);
                element.dispatchEvent(e);
            };
        }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -