demo.htm<script>
function a(){
var strText=""
var intSelIndex=document.form1.selectyear.selectedIndex
if (intSelIndex>=0)
{ strText = document.form1.selectyear.options(intSelIndex).value ;
window.location.href = "t.htm?year=" + strText;
}
}
</script>
<form name="form1">
<select name=selectyear>
<option value="1">1
<option value="2">2
</select>
</form>
<input type=button onclick="a()" value="test">t.htm<script>
function get()
{
var url = location.href;
alert(url.split("?")[1]);
}
</script>
<body onload="get()">
function a(){
var strText=""
var intSelIndex=document.form1.selectyear.selectedIndex
if (intSelIndex>=0)
{ strText = document.form1.selectyear.options(intSelIndex).value ;
window.location.href = "t.htm?year=" + strText;
}
}
</script>
<form name="form1">
<select name=selectyear>
<option value="1">1
<option value="2">2
</select>
</form>
<input type=button onclick="a()" value="test">t.htm<script>
function get()
{
var url = location.href;
alert(url.split("?")[1]);
}
</script>
<body onload="get()">
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货