复制代码 代码如下:
<script language="javascript" type ="text/javascript" >

var Arrchange1 =new Array ();
var Arrchange2 =new Array ();
var Arrchange3 =new Array ();
function hide(s_id,index)
{
var xxx = document .getElementById (s_id);
var oldOption = xxx.children(index);
var oldStr = oldOption.innerText;
var newOption = document.createElement('<div' + oldOption.outerHTML.match(/(<\w*)([^>]*)(>)/)[2] +'>');
newOption.innerText= oldStr;
newOption.swapNode(oldOption);
//alert(xxx.innerHTML);
}

function show(s_id,index)
{
var xxx =document .getElementById (s_id);
var oldOption = xxx.children(index);
if(oldOption.tagName=='DIV')
{
var oldStr = oldOption.innerText;
var newOption = document.createElement('<option' + oldOption.outerHTML.match(/(<\w*)([^>]*)(>)/)[2] +'>');
newOption.innerText = oldStr;
newOption.swapNode(oldOption);
}
//alert(xxx.innerHTML);
}



function onchange1()
{
var s_index=document .getElementById ("Ddl_question1").options[document .getElementById ("Ddl_question1").selectedIndex].value;
s_index = parseInt(s_index);
if(s_index ==0)
{
show ('Ddl_question2',Arrchange1 [0] );
show ('Ddl_question3',Arrchange1 [0] );
Arrchange1.pop();
}
else
{
Arrchange1.push(s_index);
if(Arrchange1.length>0)
{
show ('Ddl_question2',Arrchange1 [0] );
}
if(Arrchange1.length>0)
{
show ('Ddl_question3',Arrchange1 [0] );
}
hide('Ddl_question2',s_index);
hide('Ddl_question3',s_index);
}
}
function onchange2()
{
var s_index=document .getElementById ("Ddl_question2").options[document .getElementById ("Ddl_question2").selectedIndex].value;
s_index = parseInt(s_index);
if(s_index ==0)
{
show ('Ddl_question1',Arrchange1 [0] );
show ('Ddl_question3',Arrchange3 [0] );
Arrchange2.pop();
}
else
{
Arrchange2.push(s_index);
if(Arrchange2.length>0)
{
show ('Ddl_question1',Arrchange2 [0] );
}
if(Arrchange2.length>0)
{
show ('Ddl_question3',Arrchange2 [0] );
}
hide('Ddl_question1',s_index);
hide('Ddl_question3',s_index);
}
}
function onchange3()
{
var s_index=document .getElementById ("Ddl_question3").options[document .getElementById ("Ddl_question3").selectedIndex].value;
s_index = parseInt(s_index);
if(s_index ==0)
{
show ('Ddl_question1',Arrchange3 [0] );
show ('Ddl_question2',Arrchange3 [0] );
Arrchange3.pop();
}
else
{
Arrchange3.push(s_index);
if(Arrchange1.length>0)
{
show ('Ddl_question1',Arrchange3 [0] );
}
if(Arrchange2.length>0)
{
show ('Ddl_question2',Arrchange3 [0] );
}
hide('Ddl_question1',s_index);
hide('Ddl_question2',s_index);
}
}

function a() {alert("fuck ");}
</script>

<select name="Ddl_question1" id="Ddl_question1" onchange="onchange1()">
<option value="0">请选择密保信息</option>
<option value="1">您母亲的姓名是?</option>
<option value="2">您父亲的姓名是?</option>
<option value="3">您配偶的姓名是?</option>
<option value="4">您的出生地是?</option>
<option value="5">您高中班主任的姓名是?</option>
<option value="6">您初中班主任的姓名是?</option>
<option value="7">您小学班主任的姓名是?</option>
<option value="8">您小学校名是?</option>
<option value="9">您的学号(或工号)是?</option>
<option value="10">您父亲的生日是?</option>
<option value="11">您母亲的生日是?</option>
<option value="12">您配偶的生日是?</option>

</select>
<select name="Ddl_question2" id="Ddl_question2" onchange="onchange2()">
<option value="0">请选择密保信息</option>
<option value="1">您母亲的姓名是?</option>
<option value="2">您父亲的姓名是?</option>
<option value="3">您配偶的姓名是?</option>
<option value="4">您的出生地是?</option>
<option value="5">您高中班主任的姓名是?</option>
<option value="6">您初中班主任的姓名是?</option>
<option value="7">您小学班主任的姓名是?</option>
<option value="8">您小学校名是?</option>
<option value="9">您的学号(或工号)是?</option>
<option value="10">您父亲的生日是?</option>
<option value="11">您母亲的生日是?</option>
<option value="12">您配偶的生日是?</option>

</select>
<select name="Ddl_question3" id="Ddl_question3" onchange="onchange3()">
<option value="0">请选择密保信息</option>
<option value="1">您母亲的姓名是?</option>
<option value="2">您父亲的姓名是?</option>
<option value="3">您配偶的姓名是?</option>
<option value="4">您的出生地是?</option>
<option value="5">您高中班主任的姓名是?</option>
<option value="6">您初中班主任的姓名是?</option>
<option value="7">您小学班主任的姓名是?</option>
<option value="8">您小学校名是?</option>
<option value="9">您的学号(或工号)是?</option>
<option value="10">您父亲的生日是?</option>
<option value="11">您母亲的生日是?</option>
<option value="12">您配偶的生日是?</option>

</select>
标签:
dropdownlist,互相联动

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。