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

📄 default.js

📁 在编写管理信统软件中,您是否对于繁琐的多用户权限管理而头痛?需要对不同的用户设置不同的权限,需要添加/删除用户,并进行相应的管理.您是否对这些功能感到厌烦? 现在,RGP(Red Glove Perm
💻 JS
字号:
function window.onresize()
{
    try
    {
	    var h = document.documentElement.clientHeight - document.all.divToolBar.offsetHeight - document.all.divStatusBar.offsetHeight;
	    if(h > 0) document.all.divMain.style.height = h;
	}
	catch(e)
	{
	    alert(Message.clientError);
	    window.location.href = "../../Frameset/Welcome.aspx";
	}
}

function window.onload()
{
    window.onresize();
    document.all.txtOldPassword.focus();
}

//
//	id:		btnSubmit
//	event:	onclick
//
function btnSubmitClicked()
{
    try
    {
	    if(!_checkInputValue()) return;
    	
        var updateStr = StringHelper.buildFlatXmlString(
			            "Staff",
			            ["OldPassword", "NewPassword"],
			            [document.all.txtOldPassword.value,
			             document.all.txtNewPassword.value]);

        var sSucceed = XmlHttpHelper.transmit(false, "post", "text", "RemoteHandlers/UpdatePassword.ashx", null, updateStr);

        if(sSucceed == "1")
        {
            alert("修改密码成功。");
        }
        else if(sSucceed == "0")
        {
            document.all.divAlertMess.innerText = "“原密码”错误。";
        }
        else
        {
            alert(Message.serverError);
            location.reload(true);
        }
        
        document.all.txtOldPassword.value = "";
        document.all.txtNewPassword.value = "";
        document.all.txtReNewPassword.value = "";
	}
	catch(e)
	{
	    alert(Message.clientError);
	    location.reload(true);
	}
}

//
//	检测输入项合法性。
//
function _checkInputValue()
{
    document.all.divAlertMess.innerText = "";
    
	if(document.all.txtOldPassword.value.length < 6)
	{
		document.all.divAlertMess.innerText = "“原密码”长度必须大于等于 6 位。";
		return false;
	}
	if(document.all.txtNewPassword.value.length < 6)
	{
		document.all.divAlertMess.innerText = "“新密码”长度必须大于等于 6 位。";
		return false;
	}
	if(document.all.txtNewPassword.value != document.all.txtReNewPassword.value)
	{
		document.all.divAlertMess.innerText = "“新密码”和“新密码确认”不一致。";
		return false;
	}
	return true;
}

⌨️ 快捷键说明

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