好学IT学院:IT信息技术分享交流平台
来源:互联网  作者:本站整理  发布时间:2007-12-14  ★★★加入收藏〗〖手机版
摘要:1、GetCity.aspx?pid=private void Page_Load(object sender, System.EventArgs e)// 在此处放置用户代码以初始化页面Regex re=new Regex("^[0-9]……

4、主页面

Page_Load:
this.ddlProvince.Attributes.Add("onchange","return g('c');");
this.ddlCity.Attributes.Add("onchange","return g('z');");
this.ddlZone.Attributes.Add("onchange","return z();");
javascript:

<script lang="javascript">
function p(t)
{
document.all("ctl_loaded_h"+t).value=document.all("ctl_loaded_ddl"+t).value;

//alert(document.all("ctl_loaded_h"+t).value);
if(document.all("ctl_loaded_ddl"+t).selectedIndex!=0)
{
document.all("img"+t).style.display="inline";
document.all("img"+t).src="/ShowImage.aspx?id="+document.all("ctl_loaded_ddl"+t).value;
}
else
{
document.all("img"+t).style.display="none";
document.all("img"+t).src="";
}
if(t=='Position')
{
document.all("ctl_loaded_ddlFrame").focus();
}
else if(t=='Frame')
{
 document.all("ctl_loaded_ddlPic1").focus();
}
if(t=='Pic1')
{
 document.all("ctl_loaded_ddlPic2").focus();
}
if(t=='Pic2')
{
 document.all("ctl_loaded_ddlPic3").focus();
}
if(t=='Pic3')
{
 document.all("ctl_loaded_ddlPic4").focus();
}
if(t=='Pic4')
{
 document.all("ctl_loaded_ddlPic5").focus();
}
if(t=='Pic5')
{
 document.all("ctl_loaded_btnFB").focus();
}
}
</script>
<script language="javascript">
var req = false;
function g(t)
{
req = false;
if (window.XMLHttpRequest)
{ // Mozilla, Safari,...
req = new XMLHttpRequest();
if (req.overrideMimeType)
{
req.overrideMimeType('text/xml');
}
}
else if (window.ActiveXObject)
{ // IE      
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
req = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{alert(e);return false;}
}
}
if (!req)
{     
return false;
}
if(t=='c')
{
document.all("ctl_loaded_zone").value='0';
document.all("ctl_loaded_city").value='0';
document.all("ctl_loaded_province").value=document.Form1.ctl_loaded_ddlProvince.selectedIndex;
for(i=document.all("ctl_loaded_ddlCity").options.length-1;i>0;i--)
{
document.all("ctl_loaded_ddlCity").options.remove(i);
}      
for(i=document.all("ctl_loaded_ddlZone").options.length-1;i>0;i--)
{
document.all("ctl_loaded_ddlZone").options.remove(i);
}

if(document.Form1.ctl_loaded_ddlProvince.selectedIndex==0)
{                      
return false;      
}
else
{
req.open('GET', '/GetCity.aspx?pid='+document.Form1.ctl_loaded_ddlProvince.selectedIndex, true);
req.onreadystatechange = onC;
document.all("ctl_loaded_ddlCity").focus();
}
}
else if(t=='z')
{
document.all("ctl_loaded_zone").value=0;
document.all("ctl_loaded_city").value=document.Form1.ctl_loaded_ddlCity.selectedIndex;
for(i=document.all("ctl_loaded_ddlZone").options.length-1;i>0;i--)
{
document.all("ctl_loaded_ddlZone").options.remove(i);
}
if(document.Form1.ctl_loaded_ddlCity.selectedIndex==0)
{                              
return false;      
}
else
{
req.open('GET', '/GetZone.aspx?pid='+document.Form1.ctl_loaded_ddlProvince.selectedIndex
+'&cid='+document.Form1.ctl_loaded_ddlCity.selectedIndex, true);
req.onreadystatechange = onZ;
document.all("ctl_loaded_ddlZone").focus();
}
}
else if(t=='i')
{
for(i=document.all("ctl_loaded_ddlPosition").options.length-1;i>0;i--)
{
document.all("ctl_loaded_ddlPosition").options.remove(i);
document.all("ctl_loaded_ddlFrame").options.remove(i);
document.all("ctl_loaded_ddlPic1").options.remove(i);
document.all("ctl_loaded_ddlPic2").options.remove(i);
document.all("ctl_loaded_ddlPic3").options.remove(i);
document.all("ctl_loaded_ddlPic4").options.remove(i);
document.all("ctl_loaded_ddlPic5").options.remove(i);
}
req.open('GET', '/GetImages.aspx?uid='+<%=Session["xxptw_cor_user_name"]%>, true);
req.onreadystatechange = onI;
}
else
{
return false;
}
//http_request.open('GET', '/GetCity.aspx?pid=1', true);
req.send(null);
}

Visual Basic变量、常数和数据类型及过程概述
  变量、常数和数据类型概述在 Visual Basic 环境下进行计算时,常常需要临时存储数据。例如,可能想要计算几个值,将它们进行…
  • 好学触屏公众号虎力全开、杨帆起航!
  • 好学考试H5触屏版开放内测