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

📄 webuiconfirmation.js

📁 DocFlow展示了使用.NET开发平台结合Microsoft SQL Server数据库和Microsoft Indexing Service索引服务同样也能创建功能强大的文档管理门户。 Do
💻 JS
字号:
var Page_ConfirmationVer = "1.7";



function ConfirmationOnLoad() {
    
    if ( !ConfirmationBrowserCapable() ) return;
    if (typeof(Page_Confirmations) == "undefined") return;


    var i, confirmButton;
    for (i = 0; i < Page_Confirmations.length; i++) {
        confirmButton = Page_Confirmations[i];
        if (typeof(confirmButton) == "string") {
            confirmButton = document.getElementById( confirmButton );
        }
        
        if ( typeof(confirmButton.confirmationmessage ) == "undefined" ) {
            if ( typeof( confirmButton.attributes ) != "undefined" ) {
                confirmButton.confirmationmessage = confirmButton.attributes["confirmationmessage"].value;
            } else {
                confirmButton.confirmationmessage = "Are you sure you want to do this?";
            }
        }
        ConfirmationHookupControl(confirmButton);
        
    }
}

function ConfirmationBrowserCapable() {
    if ( typeof( document.getElementById ) == "undefined" ) {
        if( typeof( document.all ) != "undefined" ) {
            document.getElementById = function( elementId ) { return document.all[elementId]; };
            return true;
        }
        return false;
    }
    return true;
}



function ConfirmationHookupControl( confirmButton ) {
    var ev = confirmButton.onclick;
    
    if (typeof(ev) == "function" ) {            
        ev = ev.toString();
        ev = ev.substring(ev.indexOf("{") + 1, ev.lastIndexOf("}"));
    }
    else {
        ev = "";
    }
    var func = new Function("if ( !ConfirmationOnClick( this ) ){return false;} " + ev);

    confirmButton.onclick = func;
}

function ConfirmationOnClick( confirmButton ) {
    return confirm( confirmButton.confirmationmessage );
}

⌨️ 快捷键说明

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