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

📄 alwaysvisiblecontrol.aspx

📁 AJAX 应用 实现页面的无刷新
💻 ASPX
📖 第 1 页 / 共 3 页
字号:
        var initialLeft = 40;

        // Validate the initial location of the panel
        function checkInitialPosition() {
            testHarness.assertEqual(panel.offsetTop, initialTop, "Top of panel is at position " + panel.offsetTop + " instead of initial position " + initialTop);
            testHarness.assertEqual(panel.offsetLeft, initialLeft, "Left side of panel is at position " + panel.offsetLeft + " instead of initial position " + initialLeft);
        }

        // Validate that the panel has moved down from its original location
        function checkHasMovedVertical(position) {
                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) {
                testHarness.assertNotEqual(panel.offsetLeft, position, "Left side of panel has not moved from position " + position);
        }
        
        // Scroll the page so that the element is visible
        function scrollIntoView(element) {
            return function() { element.scrollIntoView(); }
        }
        
        // Make sure the browser supports animation for this test (i.e. whether or not the browser
        // supports CSS position: fixed)
        function requiresAnimation() {
            
            if (Sys.Browser.agent == Sys.Browser.InternetExplorer && Sys.Browser.version < 7.0) {
                return;
            }
            
            testHarness.cancel('This test can only be run on a browser that does not support CSS "position: fixed" (like IE6)');
        }

        // Register the AlwaysVisibleControl test cases
        function registerTests(harness) {
            testHarness = harness;

             // Get the controls on the page
            panel = testHarness.getElement("ctl00_ContentPlaceHolder1_content");
            btn = testHarness.getElement("ctl00_ContentPlaceHolder1_Button1");
            begin = testHarness.getElement("begin");
            end = testHarness.getElement("end");
            right = testHarness.getElement("right");
            
            // Get the ASP.NET AJAX objects on the page

⌨️ 快捷键说明

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