function setFirst(S){
S.First.length=4;
S.First.options[0].value="a";
S.First.options[0].text="a";
S.First.options[1].value="b";
S.First.options[1].text="b";
S.First.options[2].value="c";
S.First.options[2].text="c";
S.First.options[3].value="无";
S.First.options[3].text="**请选择省份**";
S.First.options[3].selected=true;
S.First.length=4;
S.First.options[0].value="a";
S.First.options[0].text="a";
S.First.options[1].value="b";
S.First.options[1].text="b";
S.First.options[2].value="c";
S.First.options[2].text="c";
S.First.options[3].value="无";
S.First.options[3].text="**请选择省份**";
S.First.options[3].selected=true;
解决方案 »
- http://nssug.baidu.com/su?wd=123&prod=superpage得不到数据
- 通过id 触发行的计算 和列的计算
- 服务器上使用javascript显示的图片为什么不能下载到客户端??
- 高手们快来帮个忙。
- 如何让垂直滚动条的主体透明,只留下上下两个箭头?
- 和IE版本有关的打印问题,急 急 急 急!!!!
- 怎么在本页面关闭打开的模态对话框?
- 有没有好的javascript的调试器
- jscript怎样才能得到highline的字符串
- 请问高手--怎样提交<select multiple>..<option>..</select>多选框(用ctrl多选)内容
- 高手给我看一下
- 请教一个简单问题!
function setFirst(S){
S.First.length=4;
S.First.options[0].value="a";
S.First.options[0].text="a";
S.First.options[1].value="b";
S.First.options[1].text="b";
S.First.options[2].value="c";
S.First.options[2].text="c";
S.First.options[3].value="无";
S.First.options[3].text="**请选择省份**";
S.First.options[3].selected=true;
}function setsecond(D){
var valueFirst=D.First.options[D.First.selectedIndex].value;
if(valueFirst.indexOf("无")==0)
{
D.second.length=1;D.second.options[0].value="无";
D.second.options[0].text="**请选择城市**"
D.second.options[0].selected=true;
} else if(valueFirst.indexOf("a")==0)
{
D.second.length=3;
D.second.options[0].value="abuse";
D.second.options[0].text="abuse";
D.second.options[1].value="abandon";
D.second.options[1].text="abandon";
D.second.options[2].value="acuse";
D.second.options[2].text="acuse";
} else if(valueFirst.indexOf("b")==0)
{
D.second.length=3;
D.second.options[0].value="bee";
D.second.options[0].text="bee";
D.second.options[1].value="bad";
D.second.options[1].text="bad";
D.second.options[2].value="born";
D.second.options[2].text="born";
} else if(valueFirst.indexOf("c")==0)
{
D.second.length=3;
D.second.options[0].value="city";
D.second.options[0].text="city";
D.second.options[1].value="capity";
D.second.options[1].text="capity";
D.second.options[2].value="car";
D.second.options[2].text="car";
}}
</script>
<body onload=setFirst(document.select);setsecond(document.select)>
<Form name="select" method="POST" action="xxx.asp">
<center>
<Table>
<TR> <td>请选择:</td>
<TD ><SELECT onchange=setsecond(document.select) name=First size="1" ></SELECT> <SELECT name=second size="1" ></SELECT> </TD>
</TR>
</Table></center>
</Form>