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

📄 functions.js

📁 翻译推荐给程序员看的好书
💻 JS
字号:
function AddCart(pno)
{	
	url = "/Payment/AddCart.aspx?pno=" + pno;
	window.open(url, 'Cart');
}
function OpenCart()
{
	var rand = Math.random().toString(); 
	var ordval = rand.substring(2,rand.length); 
	url = "/Payment/Cart.aspx?"+ordval;
	window.open(url, 'Cart');
}
function AddAA()
{
  alert("你好");
}
function AddCart1(pno1,pno2)
{	
	url = "/Payment/AddCart.aspx?pno=" + pno1 +"&relatpno="+ pno2;
	window.open(url, 'Cart');
}
function GoToPayment(pno,sign)
{	
	url = "/Payment/AddCart.aspx?pno=" + pno +"&sign="+ sign;
	window.open(url);
}
function TogetherBuy(pno1,pno2)
{
	url = "/Payment/AddCart.aspx?pno=" + pno1 +"&pno1="+ pno2;;
	window.open(url, 'Cart');	
}
function AddEPoint(pno)
{
	url="/Payment/AddEPoint.aspx?pno=" + pno;
	window.open(url,'NewEpoint');
}

function ChangeList()
{  
	var selid=document.Form1.PayType.options[document.Form1.PayType.selectedIndex].value; 
	if(selid=='3' || selid=='4' || selid=='2')
	{ 
		for(i=0;i<document.Form1.BalanceManage.length;i++)
		{
			if(document.Form1.BalanceManage.options[i].value=='1')
			{  
				document.Form1.BalanceManage.options[i].selected = false;
				document.Form1.BalanceManage.options[i] = null;
			}
		}
	}
	else
	{
		var exist=false;
		for(i=0;i<document.Form1.BalanceManage.length;i++)
		{
			if(document.Form1.BalanceManage.options[i].value=='1')
				exist=true;			
		}
		if(!exist)
			document.Form1.BalanceManage.options[document.Form1.BalanceManage.length] = new Option("退回本人",1);
	}
}

function ChangeCity()
{
	if(change)
	{
		var SelectName= window.event.srcElement.value; //document.Form1.City.options[document.Form1.City.selectedIndex].value;
		//alert(SelectName);
		if(SelectName=="bj1" || SelectName=="bj2" || SelectName=="shai" || SelectName=="shai1" || SelectName=="shai3" || SelectName=="gd")
		{
			if(document.Form1.PayType.options[0].value!='0')
			{
				if (SelectName != "shai3") {
					document.Form1.PayType.length=document.Form1.PayType.length+1;
					for(i=document.Form1.PayType.length-1; i>=1 ;i--)
					{				
						document.Form1.PayType.options[i].value = document.Form1.PayType.options[i-1].value;
						document.Form1.PayType.options[i].text = document.Form1.PayType.options[i-1].text;
					}
					document.Form1.PayType.options[0].value = 0;
					document.Form1.PayType.options[0].text = "货到付款";
					document.Form1.PayType.options[0].selected = true;
				}
			}
			else
			{
				if(SelectName == "shai3")
				{
					document.Form1.PayType.options[0].selected = false;
					document.Form1.PayType.options[0] = null;
					document.Form1.PayType.options[0].selected = true;	
				}
			}
			if(document.Form1.InceptType.options[0].value!='0')
			{
				if (SelectName != "shai1")
				{
					document.Form1.InceptType.length=document.Form1.InceptType.length+1;
					for(i=document.Form1.InceptType.length-1;i>=1;i--)
					{				
						document.Form1.InceptType.options[i].value = document.Form1.InceptType.options[i-1].value;
						document.Form1.InceptType.options[i].text = document.Form1.InceptType.options[i-1].text;	
					}					 
					document.Form1.InceptType.options[0].value = 0;
					document.Form1.InceptType.options[0].text = "送货上门(现指定地区)";			
				} else {
					document.Form1.InceptType.length=1;										 
					document.Form1.InceptType.options[0].value = 0;
					document.Form1.InceptType.options[0].text = "送货上门(现指定地区)";			
				}
			}
			else
			{
				if (SelectName == "shai1")
				{
					document.Form1.InceptType.length=1;										 
					document.Form1.InceptType.options[0].value = 0;
					document.Form1.InceptType.options[0].text = "送货上门(现指定地区)";			
				}
			}
		}
		else
		{
			if(document.Form1.PayType.options[0].value=='0')
			{
				document.Form1.PayType.options[0].selected = false;
				document.Form1.PayType.options[0] = null;
				document.Form1.PayType.options[0].selected = true;			
			}
			if(document.Form1.InceptType.options[0].value=='0')
			{
				if (SelectName == "shai2") {
					document.Form1.InceptType.length=1;										 
					document.Form1.InceptType.options[0].value = 2;
					document.Form1.InceptType.options[0].text = "挂号邮寄";			
				} else {
					document.Form1.InceptType.options[0].selected = false;
					document.Form1.InceptType.options[0] = null;
					document.Form1.InceptType.options[0].selected = true;			
				}
			}		
		}
		ChangeList();
	}
}



⌨️ 快捷键说明

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