请skyan(樱庭) 进来查看答案,没有分。

wpmsoft 2002-11-26 03:35:15
见下面。
...全文
64 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
skyan 2002-11-26
  • 打赏
  • 举报
回复
非常感谢!!!!!!!!!!!!!!!!!!我去试了!
感谢!!!!!!!!!
response.write "Yeah!!!you have got 300 points!!!congratulations!!!And you are the god!!!My Christ,I will appreciation you in my life"
wpmsoft 2002-11-26
  • 打赏
  • 举报
回复
全文如下:

<%
'谢谢你的帮助,以下是关于3级联动的代码,我现在正在为获取值而困惑,对你的帮助表示衷心的感谢!
'三级下拉框连动
'
'数据库:
'location
'表1 loaction 所在地表
' 字段
' loactionid
' loactionname 名字
'表2 district 所在的地区表
' 字段
' locationid
' districtid
' districtname
'表3 village 所在的县区表
' 字段
' districtid
' villageid
' villagename
%>
<%Option Explicit%>
<%
Dim strLocationID,strDistrictID,strVillageID
strLocationID = Trim(Request.QueryString("id1"))
strDistrictID = Trim(Request.QueryString("id2"))
strVillageID = Trim(Request.QueryString("id3"))
%>
<html>
<head>
<title>List</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
dim conn
dim rs
dim sql
dim count
dim rs1
dim sql1
dim rs2
dim sql2
dim count2



set conn=server.createobject("adodb.connection")
conn.open "location","",""


sql = "select * from district order by locationid asc"
set rs = conn.execute(sql)
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("districtname"))%>","<%= trim(rs("locationid"))%>","<%= trim(rs("districtid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
set rs=nothing
%>
onecount=<%=count%>;


function changelocation(locationid)
{
//when change1 , then change2.
//select2 value=districtid name=districtname
document.myform.smalllocation.length = 0;

var locationid=locationid;
var i;
document.myform.smalllocation.options[0] = new Option('==所选城市的地区==','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.smalllocation.options[document.myform.smalllocation.length] = new Option(subcat[i][0], subcat[i][2]);
}
}

}
</script>


<%sql2 = "select * from village order by districtid asc"
set rs2 = conn.execute(sql2)
%>
<script language = "JavaScript">
var onecount2;
onecount2=0;
subcat2 = new Array();
<%
count2 = 0
do while not rs2.eof
%>
subcat2[<%=count2%>] = new Array("<%= trim(rs2("villagename"))%>","<%= trim(rs2("districtid"))%>","<%= trim(rs2("villageid"))%>");
<%
count2 = count2 + 1
rs2.movenext
loop
rs2.close
set rs2=nothing
%>
onecount2=<%=count2%>;

function changelocation2(villageid)
{
//when change2, then change3
//select3 value=villageidname=villagename

//find districtname form subcat where id=villageid

document.myform.village.length = 0;

var villageid=villageid;
var j;

document.myform.village.options[0] = new Option('==所选地区的县区==','');
for (j=0;j < onecount2; j++)
{
if (subcat2[j][1] == villageid)
{
document.myform.village.options[document.myform.village.length] = new Option(subcat2[j][0], subcat2[j][2]);
}
}

}
</script>



</head>
<body>
<form name="myform" method="post">
题目:<input type="text" name="T2" size="20">

来源:<input type="text" name="T3" size="20">

分类:<select name="biglocation" onChange="changelocation(document.myform.biglocation.options[document.myform.biglocation.selectedIndex].value)" size="1">

<%if strLocationID = "" then%>
<option selected>请选择你所在的省份</option>
<%else%>
<option>请选择你所在的省份</option>
<%end if%>

<%

sql1 = "select * from location order by locationname asc"
set rs1 = conn.Execute (sql1)
do while not rs1.eof
%>

<%if Trim(rs1("locationid")) = strLocationID then %>
<option selected value="<%=trim(rs1("locationid"))%>"><%=trim(rs1("locationname"))%></option>
<%else%>
<option value="<%=trim(rs1("locationid"))%>"><%=trim(rs1("locationname"))%></option>
<%end if%>

<%
rs1.movenext
loop
rs1.close
set rs1 = nothing
conn.Close
set conn = nothing
%>
</select><select name="smalllocation"
onChange="changelocation2(document.myform.smalllocation.options[document.myform.smalllocation.selectedIndex].value)">

<%if strDistrictID = "" then%>
<option selected value="">==所有地区==</option>
<%else%>
<option value="">==所有地区==</option>
<script language=javascript>
var i;
for (i = 0; i< onecount; i++)
{
if (subcat[i][1] ==<%=strLocationID%>)
{
if (subcat[i][2] == <%=strDistrictID%>)
document.write("<option selected ");
else
document.write("<option ");
document.write("value="+subcat[i][2]+">"+subcat[i][0]+"</option>");
}
}
</script>
<%end if%>


</select><select name="village" size="1">

<%if strVillageID = "" then%>
<option selected>==所有县区==</option>
<%else%>
<option>==所有县区==</option>
<script language=javascript>
for (i = 0; i< onecount2; i++)
{
if (subcat2[i][1] ==<%=strDistrictID%>)
{
if (subcat2[i][2] == <%=strVillageID%>)
document.write("<option selected ");
else
document.write("<option ");
document.write("value="+subcat2[i][2]+">"+subcat2[i][0]+"</option>");
}
}
</script>
<%end if%>


</select>


关键词:<input type="text" name="T4" size="20">

内容:<textarea rows="9" name="S1" cols="51"></textarea>
</form>

</body>
</html>



—————————————————————————————————
   ★ 与人玫瑰,手有余香
wpmsoft 2002-11-26
  • 打赏
  • 举报
回复
<%if strVillageID = "" then%>
<option selected>==所有县区==</option>
<%else%>
<option>==所有县区==</option>
<script language=javascript>
for (i = 0; i< onecount2; i++)
{
if (subcat2[i][1] ==<%=strDistrictID%>)
{
if (subcat2[i][2] == <%=strVillageID%>)
document.write("<option selected ");
else
document.write("<option ");
document.write("value="+subcat2[i][2]+">"+subcat2[i][0]+"</option>");
}
}
</script>
<%end if%>

这是改变县区的修正版

<%if strDistrictID = "" then%>
<option selected value="">==所有地区==</option>
<%else%>
<option value="">==所有地区==</option>
<script language=javascript>
var i;
for (i = 0; i< onecount; i++)
{
if (subcat[i][1] ==<%=strLocationID%>)
{
if (subcat[i][2] == <%=strDistrictID%>)
document.write("<option selected ");
else
document.write("<option ");
document.write("value="+subcat[i][2]+">"+subcat[i][0]+"</option>");
}
}
</script>
<%end if%>

这是改变地区的修正版
meizz 2002-11-26
  • 打赏
  • 举报
回复
我也写了一个例子:
<form name=form1>

<select name=sheng onchange="cityName(this.value)">
<option value="">请选择省名</option>
</select>

<select name=city>
<option value="">请选择城名</option>
</select>

</form>

<script language=javascript>
var cityouterHTML = document.form1.city.outerHTML.substr(0, document.form1.city.outerHTML.length-9);
function sheng()
{
var shengName = ["浙江", "江苏", "安徽", "江西"]; //这些数据可以从数据库中取得

var e = document.form1.sheng;
var s = e.outerHTML.substr(0, e.outerHTML.length-9) + "\r\n";
for (var i=0; i<shengName.length; i++){
s += "<option value='"+ shengName[i] +"'>"+ shengName[i] +"</option>\r\n";}
s += "</select>";
e.outerHTML = s;
} sheng();
function cityName(val)
{
var 浙江 = ["杭州", "宁波", "温州", "绍兴", "金华", "湖州"];
var 江苏 = ["南京", "苏州", "无锡", "常州", "镇江", "徐州"];
var 安徽 = ["合肥", "翕县", "黄山", "祁门", "休宁"];
var 江西 = ["南昌", "九江", "赣州", "上饶", "新余", "景德镇"];
//这些数据可以从数据库中取得

var e = document.form1.city;
var s = cityouterHTML;
if (val == "") {s += "</select>"; e.outerHTML = s; return;}
var a = eval(val);
for (var i=0; i<a.length; i++)
{
s += "<option value='"+ a[i] +"'>"+ a[i] +"</option>\r\n";
}
s += "</select>";
e.outerHTML = s;
}
</script>
wpmsoft 2002-11-26
  • 打赏
  • 举报
回复
if strLocationID = "" then
strDistrictID=""
strVillageID=""
else if strDistrictID="" then
strVillageID=""
end if
end if
通过以上代码保证参数的正确性

—————————————————————————————————
   ★ 与人玫瑰,手有余香 ★
wpmsoft 2002-11-26
  • 打赏
  • 举报
回复
我没有实现数组过滤(即仅仅显示对应省的对应区的对应县,其实你的参数是有要求的,即不可以id1无值而id2有值。你可以添加代码以完善它。
以上仅是思路而已,在我的机器上通过测试,但代码有些冗余,请自行修正。
wpmsoft 2002-11-26
  • 打赏
  • 举报
回复
<%
'谢谢你的帮助,以下是关于3级联动的代码,我现在正在为获取值而困惑,对你的帮助表示衷心的感谢!
'三级下拉框连动
'
'数据库:
'location
'表1 loaction 所在地表
' 字段
' loactionid
' loactionname 名字
'表2 district 所在的地区表
' 字段
' locationid
' districtid
' districtname
'表3 village 所在的县区表
' 字段
' districtid
' villageid
' villagename
%>
<%Option Explicit%>
<%
Dim strLocationID,strDistrictID,strVillageID
strLocationID = Trim(Request.QueryString("id1"))
strDistrictID = Trim(Request.QueryString("id2"))
strVillageID = Trim(Request.QueryString("id3"))
%>
<html>
<head>
<title>List</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
dim conn
dim rs
dim sql
dim count
dim rs1
dim sql1
dim rs2
dim sql2
dim count2



set conn=server.createobject("adodb.connection")
conn.open "location","",""


sql = "select * from district order by locationid asc"
set rs = conn.execute(sql)
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("districtname"))%>","<%= trim(rs("locationid"))%>","<%= trim(rs("districtid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
set rs=nothing
%>
onecount=<%=count%>;


function changelocation(locationid)
{
//when change1 , then change2.
//select2 value=districtid name=districtname
document.myform.smalllocation.length = 0;

var locationid=locationid;
var i;
document.myform.smalllocation.options[0] = new Option('==所选城市的地区==','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.smalllocation.options[document.myform.smalllocation.length] = new Option(subcat[i][0], subcat[i][2]);
}
}

}
</script>


<%sql2 = "select * from village order by districtid asc"
set rs2 = conn.execute(sql2)
%>
<script language = "JavaScript">
var onecount2;
onecount2=0;
subcat2 = new Array();
<%
count2 = 0
do while not rs2.eof
%>
subcat2[<%=count2%>] = new Array("<%= trim(rs2("villagename"))%>","<%= trim(rs2("districtid"))%>","<%= trim(rs2("villageid"))%>");
<%
count2 = count2 + 1
rs2.movenext
loop
rs2.close
set rs2=nothing
%>
onecount2=<%=count2%>;

function changelocation2(villageid)
{
//when change2, then change3
//select3 value=villageid name=villagename

//find districtname form subcat where id=villageid

document.myform.village.length = 0;

var villageid=villageid;
var j;

document.myform.village.options[0] = new Option('==所选地区的县区==','');
for (j=0;j < onecount2; j++)
{
if (subcat2[j][1] == villageid)
{
document.myform.village.options[document.myform.village.length] = new Option(subcat2[j][0], subcat2[j][2]);
}
}

}
</script>



</head>
<body>
<form name="myform" method="post">
题目:<input type="text" name="T2" size="20">

来源:<input type="text" name="T3" size="20">

分类:<select name="biglocation" onChange="changelocation(document.myform.biglocation.options[document.myform.biglocation.selectedIndex].value)" size="1">

<%if strLocationID = "" then%>
<option selected>请选择你所在的省份</option>
<%else%>
<option>请选择你所在的省份</option>
<%end if%>

<%

sql1 = "select * from location order by locationname asc"
set rs1 = conn.Execute (sql1)
do while not rs1.eof
%>

<%if Trim(rs1("locationid")) = strLocationID then %>
<option selected value="<%=trim(rs1("locationid"))%>"><%=trim(rs1("locationname"))%></option>
<%else%>
<option value="<%=trim(rs1("locationid"))%>"><%=trim(rs1("locationname"))%></option>
<%end if%>

<%
rs1.movenext
loop
rs1.close
set rs1 = nothing
conn.Close
set conn = nothing
%>
</select><select name="smalllocation"
onChange="changelocation2(document.myform.smalllocation.options[document.myform.smalllocation.selectedIndex].value)">

<%if strDistrictID = "" then%>
<option selected value="">==所有地区==</option>
<%else%>
<option value="">==所有地区==</option>
<script language=javascript>
var i;
for (i = 0; i< onecount; i++)
{
document.write("<option ");
if (subcat[i][2] == <%=strDistrictID%>)
document.write("selected ");
document.write("value="+subcat[i][2]+">"+subcat[i][0]+"</option>");
}
</script>
<%end if%>


</select><select name="village" size="1">

<%if strVillageID = "" then%>
<option selected>==所有县区==</option>
<%else%>
<option>==所有县区==</option>
<script language=javascript>
for (i = 0; i< onecount2; i++)
{
document.write("<option ");
if (subcat2[i][2] == <%=strVillageID%>)
document.write("selected ");
document.write("value="+subcat2[i][2]+">"+subcat2[i][0]+"</option>");
}
</script>
<%end if%>


</select>


关键词:<input type="text" name="T4" size="20">

内容:<textarea rows="9" name="S1" cols="51"></textarea>
</form>

</body>
</html>

【源码免费下载链接】:https://renmaiwang.cn/s/6fkq4 《REST_V1.8_130615:静息态磁共振图像数据处理算法程序详解》静息态磁共振成像(Resting-State Functional Magnetic Resonance Imaging,简称rs-fMRI)是一种无须外界刺激即可研究大脑自发活动的技术。REST_V1.8_130615 是一个专门用于处理这类数据的软件工具,它集成了先进的统计参数映射(Statistical Parametric Mapping, SPM)和独立成析(Independent Component Analysis, ICA)方法,为神经科学家提供了一套强大的析工具。1. 统计参数映射(SPM):SPM 是一种广泛应用于fMRI数据析的统计框架,主要用于检测大脑在不同条件下的活动变化。它通过对每个体素的信号强度进行统计测试,找出那些显著不同于基线或在不同条件下表现出显著差异的区域。REST_V1.8_130615 中的SPM模块可以帮助用户进行数据预处理(如头部运动校正、配准、标准化)、建立模型、进行假设检验,以及生成统计图和结果报告。2. 独立成析(ICA):ICA是一种盲源离技术,常用于fMRI数据中的噪声去除和功能连接析。它通过寻找非高斯布的独立源来解混合信号,从而离出大脑的不同功能网络。REST_V1.8_130615 的ICA模块可以自动识别并去除噪声成,例如生理噪声、头部运动伪影等,同时提取出稳定的脑功能网络模式。3. 功能束绑定(Functional Bundling):功能束绑定是rs-fMRI析中的一个重要环节,它涉及到大脑网络的结构和功能连接。REST_V1.8_130615 可能包含了对大脑白质纤维束的析,以理解大脑区域间的物理连接如何与功能连接相吻合。4.

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧