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

📄 websitejavascript.js

📁 Dos 以功能个性化和人性化为基础
💻 JS
📖 第 1 页 / 共 3 页
字号:

function DosJscriptShowmenu(e,vmenuobj){
	if (document.readyState=="complete")
	{ 
	var vobj=document.getElementById(vmenuobj);
	if (vobj==null)
	{
		return;
		}
	
	var shimName="Dos_WebSiteDiv";
	DosCreateDiv(shimName);
	var divObj=document.getElementById(shimName);
	if (divObj.openID!="")
	{
		DosHiddenMenu(divObj.openID);
		}
        divObj.openID=vmenuobj;	
        var getlength
        getlength=DosJscriptXoffsetParent(event.srcElement)+0;
        vobj.style.left=getlength;
        getlength=DosJscriptYoffsetParent(event.srcElement)+18;
        vobj.style.top=getlength;
        vobj.style.visibility="visible";
        vobj.style.zIndex=100000;

        divObj.style.left=vobj.style.left;
        divObj.style.top=vobj.style.top;
        divObj.style.width=vobj.offsetWidth;
        divObj.style.height=vobj.offsetHeight;
        divObj.style.visibility="visible";
	

        var iframeName="Dos_WebSiteIframe";
        DosCreateIfrom(iframeName);
        var iframeObj=document.getElementById(iframeName);	  
        iframeObj.style.display='';
        iframeObj.style.left=vobj.style.posLeft;
        iframeObj.style.top=vobj.style.posTop;
        iframeObj.style.width=vobj.offsetWidth;
        iframeObj.style.height=vobj.offsetHeight;
        iframeObj.style.zIndex=divObj.style.zIndex-1;	 
	 }
}
function DosCreateDiv(shimName)
{
	  var divObj=document.getElementById(shimName);
	  if (divObj==null)
	  {
	  	  divObj = document.createElement("<div></div>"); 
		  divObj.name = shimName;
		  divObj.id = shimName;
	  	  divObj.openID="";
	  	  divObj.className="Dos_menuskin";
	      divObj.style.zIndex=10000;	
		  window.document.body.appendChild(divObj);
	  }

}
function DosCreateIfrom(iframeName)
{
    var iframeObj=document.getElementById(iframeName);
    if (iframeObj==null)
    {
    var iframeObj = document.createElement("<iframe scrolling='no' frameborder='1'"+
                                  "style='position:absolute; top:0px;"+
                                  "left:0px; display:none;width:0;height:0'></iframe>"); 
    iframeObj.name = iframeName;
    iframeObj.id = iframeName;
    window.document.body.appendChild(iframeObj);
    }
}
function DosJscriptYoffsetParent(e){  
	var t=e.offsetTop;  
	while(e=e.offsetParent){  
		t+=e.offsetTop;  
	}  
	return t;  
}  
function DosJscriptXoffsetParent(e){  
	var l=e.offsetLeft;  
	while(e=e.offsetParent){  
		l+=e.offsetLeft;  
	}  
	return l;  
}  
function DosJscriptOnMouseOutMenu(e)
{
	var vobj=document.getElementById(e.id);	
	var shimName="Dos_WebSiteDiv";
	  var divObj=document.getElementById(shimName);
	  
	  if ((event.clientX<=eval(parseInt(e.style.left)+1+parseInt(document.body.scrollLeft)))||(event.clientX>=eval(parseInt(e.style.left))+e.offsetWidth+parseInt(document.body.scrollLeft))||(event.clientY<=eval(parseInt(e.style.top))+1-parseInt(document.body.scrollTop))||(event.clientY>=eval(parseInt(e.style.top))+e.offsetHeight-parseInt(document.body.scrollTop)))
	  {
		  DosHiddenMenu(e.id);
		  }
	}
function DosHiddenMenu(shimName)
{
	var vobj=document.getElementById(shimName);
	vobj.style.visibility='hidden';
	shimName="Dos_WebSiteDiv";
	vobj=document.getElementById(shimName);
	vobj.openID="";
	vobj.style.visibility="hidden"
	shimName="Dos_WebSiteIframe";
	vobj=document.getElementById(shimName);
	if (vobj!=null)
	{
	    vobj.style.display='none';
	}
	}

document.onclick=DosDocumentOnclick;

function DosDocumentOnclick()
{
	var shimName="Dos_WebSiteDiv";
	var vobj=document.getElementById(shimName);
	if (vobj!=null)
	{
		if (vobj.style.visibility=="visible")
		{
			DosHiddenMenu(vobj.openID);
			}
		}
	}



function JavascriptSetStyle(CssUrl)
{
	var url="/UserInfo/SetPageStyle.aspx?CssUrl="+CssUrl.replace(".css","");
	XmlHttpSetResult('0',url);
	document.all.WebSite_System_Css.href='/Style/'+CssUrl+'';
}

function JavaScrptWebSiteUserLogin()
{
        if (document.all.UserName.value=="")
        {
            alert('请输入用户名称!');
            document.all.UserName.focus();
            return;
        }
        if (document.all.UserPassWord.value=="")
        {
            alert('请输入用户密码!');
            document.all.UserPassWord.focus();
            return;
        }
    ScreenConvert();
    document.WebSiteForm.target='WebSiteTarGet';
    document.WebSiteForm.action='/UserInfo/UserLoginAction.aspx';
    document.all.WebSiteForm.submit();
}//

function ScreenConvert()
{
	v_ScreenAlpha = 80;
	var objScreen = document.getElementById("WebSiteHiddenDiv");
    objScreen.innerHTML='<div  style=\"margin-top:'+document.body.scrollWidth/4+'px ;height:'+document.body.scrollHeight/8+'px;\"><div style=\"width:311px; height:25px;\"><div style=\"width:7px; background:url(/images/group141.gif); height:25px; float:left\"></div><div style=\"width:297px; padding-top:2px; text-align:left; background:url(/images/group146.gif); float:left; height:25px\">系统提示!</div><div style=\"width:7px; background:url(/images/group142.gif); height:25px; float:right\"></div></div><div style=\"width:311px; height:146px;\"><div style=\"width:7px; background:url(/images/group147.gif); height:146px; float:left\"></div><div style=\"width:297px; background:url(/images/group145.gif); float:left; height:146px; text-align:center\"><div style=\"width:260px; margin-top:40px;\"><IMG height=12 src=\"/images/load.gif\" width=250></div><div style=\"width:260px; margin-top:8px;\">操作中,请稍候......</div></div><div style=\"width:7px; background:url(/images/group148.gif); height:146px; float:right\"></div></div><div style=\"width:311px; height:7px;\"><div style=\"width:7px; height:7px; float:left\"><IMG height=7 src=\"/images/group144.gif\" width=7></div><div style=\"width:297px; height:7px; float:left; background:url(/images/group149.gif)\"><IMG height=7 src=\"/images/group149.gif\" width=7></div><div style=\"width:7px; height:7px; float:right\"><IMG height=7 src=\"/images/group143.gif\" width=7></div></div></div>'
	objScreen.style.display = '';
	objScreen.style.top = "0px";
	objScreen.style.left = "0px";
	objScreen.style.width = document.body.scrollWidth + "px";
	objScreen.style.height = document.body.scrollHeight + "px";
	objScreen.style.position = "absolute";
	objScreen.style.zIndex = "3000";
	objScreen.style.background = "#cccccc";
	objScreen.style.filter = "alpha(opacity=" + v_ScreenAlpha + ")";
	var allselect = document.getElementsByTagName("select");
	for (var i=0; i<allselect.length; i++)
	{
		allselect[i].style.visibility = "hidden";
	}
}
function ScreenClear()
{
	var objScreen = document.getElementById("WebSiteHiddenDiv");
	objScreen.innerHTML='';
	objScreen.style.top = "0px";
	objScreen.style.left = "0px";
	objScreen.style.width = 0 + "px";
	objScreen.style.height = 0 + "px";
	objScreen.style.display = 'none';
	var allselect = document.getElementsByTagName("select");
	for (var i=0; i<allselect.length; i++)
	{
		allselect[i].style.visibility = "";
	}
}//

function XmlHttpSetResult(IDinnerHTML,XmlHttpPage)
{
ScreenConvert();
var oBao = new ActiveXObject("Microsoft.XMLHTTP");
//特殊字符:+,%,&,=,?等的传输解决办法.字符串先用escape编码的.
//Update:2004-6-1 12:22
oBao.open("POST",XmlHttpPage,true);
oBao.send();

    if (IDinnerHTML!="0")
    {
    //服务器端处理返回的是经过escape编码的字符串.
    var strResult = unescape(oBao.responseText);
    
    eval("document.all."+IDinnerHTML).innerHTML=strResult;
    }
    ScreenClear();
}

function WebSiteCountTimer(IDinnerHTML,XxlHttpPage,Timer)
{
    IDinner=IDinnerHTML;XxlHttp=XxlHttpPage;Timers=Timer;
if (escape(document.referrer)!="")
{
XxlHttp+="?ComeFrom="+escape(document.referrer)
}
    XmlHttpSetResult(IDinner,XxlHttp);
    TimerFunction(IDinner,XxlHttp,Timers);
}
function TimerFunction(IDinnerHTML,XxlHttpPage,Timer)
{
    Timers=Timer;XxlHttp=XxlHttpPage;IDinner=IDinnerHTML;
    timer = window.setInterval("XmlHttpSetResult(IDinner,XxlHttp)",Timer*100);
}
function ShowPostBuyMoney(n1)
{
        msg=confirm("您确认要支付浏览吗?")	
		if (msg==0)
		{
			return; 
		}
		else
		{
		    JavascriptPostXml(''+n1+'',true);
		}
}//
function WebSite_SetMyArray()
{

	if (document.all.TopicParentID.value==0)
	{
	document.all.TopicSubjectID.length=1;
	return;
	}
var j=1;
document.all.TopicSubjectID.disabled=false;
document.all.TopicSubjectID.length=1;
	for (var i=0;i<WebSiteBoardArray.length;i++)
	{
		if ((WebSiteBoardArray[i][1]==document.all.TopicParentID.value)&&(WebSiteBoardArray[i][1]!=0))
		{
			document.all.TopicSubjectID.length=document.all.TopicSubjectID.length+1	;
			document.all.TopicSubjectID.options(j).value=WebSiteBoardArray[i][0];
			document.all.TopicSubjectID.options(j).text=WebSiteBoardArray[i][2];
			j=j+1
		}
	} 
	if (document.all.TopicSubjectID.length==1)
	{
	    document.all.TopicSubjectID.disabled=true;
	}
}
function WebSite_SetParentMyArray(id)
{	
	var j=1;
	for (var i=0;i<WebSiteBoardArray.length;i++)
	{
		if (WebSiteBoardArray[i][1]==0)
		{
			document.all.TopicParentID.length=document.all.TopicParentID.length+1;
			document.all.TopicParentID.options(j).value=WebSiteBoardArray[i][0];
			document.all.TopicParentID.options(j).text=WebSiteBoardArray[i][2];
			if (document.all.TopicParentID.options(j).value==id)
			{
				document.all.TopicParentID.options(j).selected=true;
				WebSite_SetMyArray();
			}//	
			j=j+1;
			//if (id==i)
		}
	}
	
}
function WebSite_SetTypeMyArray(id)
{
    document.all.TopicSubjectID.disabled=false;
	for (var i=0;i<document.all.TopicSubjectID.length;i++)
	{	if (id==document.all.TopicSubjectID.options(i).value)
		{
			document.all.TopicSubjectID.options(i).selected=true;
		}//
		
	}
	if (document.all.TopicSubjectID.length==1)
	{
	    document.all.TopicSubjectID.disabled=true;
	}

}//
function WebSite_SetJavascriptValueInfo(n,info)
{
    eval("document.all."+n).value=info;
}
function WebSite_SetValueTrue(n)
{

}
function WebSite_SetCheckTrue(n)
{
    eval("document.all."+n).checked='true';
}
function WebSite_CheckNub(NumCheck,nb)
{
	nr1=eval("document.all."+NumCheck).value;
	if (nr1=="")
	{
	   eval("document.all."+NumCheck).value=0; 
	}
	flg=0;
	str="";
	spc=""
	arw="";
	if (nb=="0")
	{
		cmp="0123456789."
	}
	else
	{
	    cmp="0123456789"
	}
	for (var i=0;i<nr1.length;i++)
	{
		tst=nr1.substring(i,i+1)
	if (cmp.indexOf(tst)<0)
		{
			flg++;
			str+=" "+tst;
			spc+=tst;
			arw+="^";
		}
	else{arw+="_";}
	}

⌨️ 快捷键说明

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