创建、读取cookie问题~~~
各位,我想在end0中创建一个cookie,然后在执行end1和end2时都会调用cookie,怎么写啊?郁闷我半天了~~
下面是代码~~~
function End0(locationid)
{
document.form1.End_s1.length = 0;
document.form1.End_s1.options[0] = new Option( '==请选择到达洲== ', ' ');
document.form1.End_s2.length = 0;
document.form1.End_s2.options[0] = new Option( '==请选择到达国家== ', ' ');
document.form1.End_s3.length = 0;
document.form1.End_s3.options[0] = new Option( '==请选择到达城市== ', ' ');
for (i=0; i <End_subval1.length; i++)
{
if (End_subval1[i][0] == locationid)
{document.form1.End_s1.options[document.form1.End_s1.length] = new Option(End_subval1[i][2],End_subval1[i][1]);}]
}
}
function End1(locationid)
{
document.form1.End_s2.length = 0;
document.form1.End_s2.options[0] = new Option( '==请选择到达国家== ', ' ');
document.form1.End_s3.length = 0;
document.form1.End_s3.options[0] = new Option( '==请选择到达城市== ', ' ');
for (i=0; i <End_subval2.length; i++)
{
if (End_subval2[i][0] == locationid)
{document.form1.End_s2.options[document.form1.End_s2.length] = new Option(End_subval2[i][2],End_subval2[i][1]);}
}
}
function End2(locationid)
{
document.form1.End_s3.length = 0;
document.form1.End_s3.options[0] = new Option( '==请选择到达城市== ', ' ');
for (i=0; i <End_subval3.length; i++)
{
if (End_subval3[i][0] == locationid)
{document.form1.End_s3.options[document.form1.End_s3.length] = new Option(End_subval3[i][2],End_subval3[i][1]);}
}
}
出发地点 <select name= "Begin_s3 " onChange= "End0(this.value) ">
<option> ==请选择出发城市== </option>
</select>
<br> <br> <br> <br>
到达地点:
<select name= "End_s1 " onChange= "End1(this.value) ">
<option> ==请选择到达洲== </option>
</select>
<select name= "End_s2 " onChange= "End2(this.value) ">
<option> ==请选择到达国家== </option>
</select>
------解决方案--------------------下面2个函数可以设置coo