1、在一个页面set.asp中如何获取到其下拉框里的所有值并传递给一个新的页面
<form name=form1 onsubmit="return ss();" ...
<select name=jj>
function ss()
{
form1.jj.multiple=true;
for(i=0;i<form1.jj.options.length;i++)
form1.Areaca.jj[i].selected=true;
}
2、新的页面为new.htm,通过<A href="LayerCtrl.htm?" target=_blank><IMG alt=图层控制 border=1 src="images/layer.gif" style ="HEIGHT: 25px; WIDTH: 25px" width=16 height="15" ></A>这个语句产生此页面,可是我如何将获取到的数组通过这么一句话在new.htm页面打开时一起传到new.htm页面里呢?不知所云
<form name=form1 onsubmit="return ss();" ...
<select name=jj>
function ss()
{
form1.jj.multiple=true;
for(i=0;i<form1.jj.options.length;i++)
form1.Areaca.jj[i].selected=true;
}
2、新的页面为new.htm,通过<A href="LayerCtrl.htm?" target=_blank><IMG alt=图层控制 border=1 src="images/layer.gif" style ="HEIGHT: 25px; WIDTH: 25px" width=16 height="15" ></A>这个语句产生此页面,可是我如何将获取到的数组通过这么一句话在new.htm页面打开时一起传到new.htm页面里呢?不知所云
<script>
function winOpen()
{
var a=document.form1.select1.options[document.form1.select1.selectedIndex].value;
window.open('3.asp?argument='+a,'','width=200,height=300');
}
<form name=form1>
<select name=select1>
<option value=1>1</option>
<option value=2>2</option>
</form>
一中方法是利用session or cookie
另一種方法就是join and split
<A id=OpenURL href="new.htm?" onclick="this.href+=Selected.strPara" target=_blank ><IMG alt=图层控制 border=1 src="images/layer.gif" style ="HEIGHT: 25px; WIDTH: 25px" width=16 height="15" ></A>有个缺点只能点一次:(
我的意思是要将下拉框的所有选项都传递给一个新的页面,这个页面我想通过
<A href="LayerCtrl.htm?" target=_blank><IMG alt=图层控制 border=1 src="images/layer.gif" style ="HEIGHT: 25px; WIDTH: 25px" width=16 height="15" ></A>来获得上面的方法我马上试试,可以就给分
你们谁在学院路附近,可以请你们吃冰淇淋哟
谢谢各位,明天结帖
请吃冰淇淋?向往ing...
function winOpen()
{
str=""
for(i=0;i<document.form1.select1.length;i++)
str=str+','+document.form1.select1.options[i].value;
window.open('yourpage.asp?argument='+str,'','width=200,height=300');
}
<form name=form1>
<select name=select1>
<option value=1>1</option>
<option value=2>2</option>
</form>
guagua=split(request("argument"),',')
guagua[1],guagua[2]...就是你要得到的值
当然在北京咯,不过昨天听说现在非典型肺炎厉害,不要在外边乱吃东西,还是要小心点