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

📄 gbs_global.js

📁 对日软件外包 为东芝做的一个全球商业管理系统
💻 JS
📖 第 1 页 / 共 2 页
字号:
/*--------------------------------FUNCTION---LIST---START---------------------------------

function GxOpenWin(sUrl, sWinName, iWidth, iHeight, bScrollbar)       open a window

----------------------------------FUNCTION---LIST---END----------------------------------*/

//=============================================================================
//亂 奣梫 亃 
//亂 擖椡 亃 
//亂曉媝抣亃 
//亂嶌惉幰亃 挘柧
//亂 棜楋 亃 2004擭4寧16擔 怴婯嶌惉
//=============================================================================
var screenWidth = window.screen.width;
var screenHeight = window.screen.height;

function GxOpenWin(sUrl, sWinName, iWidth, iHeight, bScrollbar)
{
	//var iX = 0;// (window.screen.width - iWidth) / 2 ; 
	//var iY = 0;// (window.screen.height - iHeight) / 2 ; 
	var iX = (screenWidth - iWidth) / 2 ; 
	var iY = (screenHeight - iHeight) / 2 ; 

	var sFeatures = "width=" + iWidth + ",height=" + iHeight + ",top=" + iY + ",left=" + iX + ",resizable=yes";
	if (bScrollbar){
	    sFeatures += ",scrollbars=1";
	}
	var win = window.open(sUrl, sWinName, sFeatures);
	return win;
}
function changeFrame() {
	var cols = parent.document.getElementById("FrmLR").cols;
	if (cols == "0,*") {
		parent.document.getElementById("FrmLR").cols = "23,77";
	} else {
		parent.document.getElementById("FrmLR").cols = "0,*";
	}
}
function GxSetInnerHTML(sId, sText)
{
	eval("document.all." + sId + ".innerHTML=\"" + sText + "\"");
}

function GxHideTr(sTrId)
{
	eval("document.all." + sTrId + ".style.display='none'");
}

function GxSetToday(sId)
{
	var dat = new Date();
	var aryMonth = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sep", "Oct", "Nov", "Dec");

	var sText = "0" + dat.getDate();
	sText = sText.substr(sText.length - 2, 2) + "-" + aryMonth[dat.getMonth()] + "-" + dat.getYear();

	GxSetInnerHTML(sId, sText);
}

function GxSetTopTitle(sTitle)
{
	document.all.spanTitle.innerHTML = sTitle;
}

//=================================================================
//亂 擖椡 亃error message
//亂 奣梫 亃display error message & focus to the frist error item
//亂曉媝抣亃void
//亂嶌惉幰亃ym
//亂嶌惉擔亃2004/08/02
//=================================================================
function showErrorMessages(strorg) {
	//alert(strorg);
	 // calc center screen
	 var cw,ch,posX,posY;
	 cw = document.body.clientWidth;
	 ch = document.body.clientWidth;

	 posX = (screen.width  - cw) / 2;
	 posY = (screen.height - ch) / 2 ;

	 var errorWin;
	 errorWin = window.open(
	  "./jsp/GBS_errmsg.jsp",
	  "ErrorMessage",
	  "width=600,height=440,top=" + posX + ",left=" + posY + ",resizable=yes,scrollbars=yes");
	 childBbmsg.push(errorWin);
}

//=================================================================
//亂 擖椡 亃focus item
//亂 奣梫 亃init page without any errormessage & fouce the item of tabindex=1
//亂曉媝抣亃void
//亂嶌惉幰亃绺壺
//亂嶌惉擔亃2003/11/05
//=================================================================
function init(item)
{
	if (item == '') {
	    for(var i=0;i<document.all.length;i++)
	    {
	         if(document.all.item(i).tabIndex==1)
	         {
	           document.all.item(i).focus();
	           break;
	         }
	    }
	} else {
	  document.all.item(item).focus();
	}
    return true;
}

//=================================
function submitto(str){
	document.all.method.value=str;
}

// error message proecess
childBbmsg = new Array();

/*--------------------------FUNCTION---LIST---START---------------------------
		暥帤楍娭悢孮
		function cmJFnc_blnSpaceChk(strChkVal)						嬻敀僠僃僢僋
		function cmJFnc_strTrimStr(strVal)							愭摢偲嵟屻偺敿妏偲慡妏僗儁乕僗傪嶍彍
		function cmJFnc_lngGetLen(strVal)							暥帤悢庢摼
		function cmJFnc_lngGetLenB(strVal)							僶僀僩悢庢摼
		function cmJFnc_blnEngNumChk(strChkVal)						塸悢帤僠僃僢僋
		function cmJFnc_blnZenKanaChk(strChkVal)					慡妏僇僫僠僃僢僋娭悢
		function cmJFnc_blnHanKanaChk(strChkVal)					敿妏僇僫僠僃僢僋娭悢
		function cmJFnc_blnNoUseChk(strChkVal)						巊梡晄壜暥帤僠僃僢僋娭悢
		function GxFillzero(strVal, nlen)							慜僛儘曇廤

		擔晅僠僃僢僋娭悢孮
		function cmJFnc_lngGetEndOfMthDay( dtmYear, dtmMonth)		寧枛擔庢摼
		function cmJFnc_strDateChk(dtmDate)							擔晅懨摉惈僠僃僢僋

		悢抣僠僃僢僋娭悢孮
		function cmJFnc_strDelCommer(strVar)						僇儞儅嶍彍張棟娭悢
		function cmJFnc_strAddCommer(strVar)						僇儞儅捛壛張棟娭悢
		function cmJFnc_blnNumChk(sData, sFlag)						悢抣僠僃僢僋張棟
		function cmJFnc_blnShosuChk(nData, nIntLen, nDecLen)		彫悢寘悢僠僃僢僋娭悢

		暋崌僠僃僢僋娭悢孮
		function cmJFnc_blnSeisuInChk(oElmt, sName, nLen)			惍悢擖椡崁栚僠僃僢僋娭悢
		function cmJFnc_blnJisuInChk(oElmt, sName, nFore, nBack)	幚悢擖椡崁栚僠僃僢僋娭悢
		function cmJFnc_blnEngNumInChk(oElmt, sName, nLen)			敿妏塸悢擖椡崁栚僠僃僢僋娭悢
		function cmJFnc_blnZenkanaInChk(oElmt, sName, nLen)			慡妏僇僫擖椡崁栚僠僃僢僋娭悢
		function cmJFnc_blnZenkakuInChk(oElmt, sName, nLen)			慡妏擖椡崁栚僠僃僢僋娭悢

----------------------------FUNCTION---LIST---END----------------------------*/
	// 暥帤楍娭悢孮 //

	//***********************************************************************************
	// 亂 婡擻丂亃	嬻敀僠僃僢僋
	// 亂 擖椡丂亃	strChkVal乮暥帤楍乯
	// 亂曉媝抣亃	嬻傕偟偔偼Null偱偁傟偽丄true丟嬻傕偟偔偼Null偱側偗傟偽丄false
	// 亂 旛峫丂亃
	//***********************************************************************************
	function cmJFnc_blnSpaceChk(strChkVal)
	{ return !cmJFnc_strTrimStr(strChkVal); }

	//***********************************************************************************
	// 亂 婡擻丂亃	愭摢偲嵟屻偺敿妏偲慡妏僗儁乕僗傪嶍彍
	// 亂 擖椡丂亃	strVar乮暥帤楍乯
	// 亂曉媝抣亃	愭摢偲嵟屻偺敿妏偲慡妏僗儁乕僗偑嶍彍偝傟偨暥帤楍
	// 亂 旛峫丂亃
	//***********************************************************************************
	function cmJFnc_strTrimStr(strVal)
	{ return strVal.replace(/^[\s丂]*|[\s丂]*$/g, ""); }

	/************************************************************************/
	// 亂 婡擻丂亃	暥帤悢庢摼
	// 亂 擖椡丂亃	strVar乮暥帤楍乯
	// 亂曉媝抣亃	暥帤悢
	// 亂 旛峫丂亃
	/************************************************************************/
	function cmJFnc_lngGetLen(strVal)
	{ return strVal.length; }

	/************************************************************************/
	// 亂 婡擻丂亃	僶僀僩悢庢摼
	// 亂 擖椡丂亃	strVar乮暥帤楍乯
	// 亂曉媝抣亃	暥帤楍偺僶僀僩悢
	// 亂 旛峫丂亃
	/************************************************************************/
	function cmJFnc_lngGetLenB(strVal)
	{
		var i = 0, len = 0;

		strVar = escape(strVar);
		for (i=0; i<strVar.length; i++, len++)
		{
			if (strVar.charAt(i) == "%")
			{
				if (strVar.charAt(++i) == "u")
				{ i += 3; len++; }
				i++;
			}
		}
		return len;
	}

	/************************************************************************/
	// 亂 婡擻丂亃	僐乕僪斖埻僠僃僢僋娭悢 (巜掕偝傟偨僐乕僪偺暥帤偩偗偺暥帤楍偐僠僃僢僋偡傞)
	// 亂 擖椡丂亃	strVar乮暥帤楍乯
	// 亂曉媝抣亃	僐乕僪斖埻偱偁傟偽丄true丟僐乕僪斖埻偱側偗傟偽丄false
	// 亂 旛峫丂亃
	/************************************************************************/
	function cmJFnc_blnCharCodeChk(strChkVal, nStart, nEnd, bXor)
	{
		var i, nCode, nLen = strChkVal.length

		for (i=0; i<nLen; i++)
		{
			if (((nCode = strChkVal.charCodeAt(i)) < nStart || nEnd < nCode) ^ bXor)
				return false;
		}
		return true;

	}

	//  塸悢帤僠僃僢僋娭悢
	function cmJFnc_blnEngNumChk(strChkVal)
	{
		return cmJFnc_blnCharCodeChk(strChkVal, 32, 126, 0); 
	}

	//  慡妏僇僫僠僃僢僋娭悢
	function cmJFnc_blnZenKanaChk(strChkVal) 
	{ 
		return cmJFnc_blnCharCodeChk(strChkVal, 12449, 12540, 0); 
	}

	//  敿妏僇僫僠僃僢僋娭悢
	function cmJFnc_blnHanKanaChk(strChkVal) 
	{ 
		return !cmJFnc_blnCharCodeChk(strChkVal, 65382, 65439, 1); 
	}

	//  巊梡晄壜暥帤僠僃僢僋娭悢
	function cmJFnc_blnNoUseChk(strChkVal)
	{

⌨️ 快捷键说明

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