谁帮我看看这里有什么问题呀?HTML调用Javascript[200分] 在线等
来源:百度知道 编辑:UC知道 时间:2024/06/06 12:34:37
http://upload.raingi.com/UpLoadFiles/HTML.rar
急。。。在线等答案,谁帮我解决马上给分
我修改完毕,并且调试通过,代码如下:
(由于字数太多,我把省的数据删除了一些)
area.js
function Dsy()
{
this.Items = {};
}
Dsy.prototype.add = function(id,iArray)
{
this.Items[id] = iArray;
}
Dsy.prototype.Exists = function(id)
{
if(typeof(this.Items[id]) == "undefined") return false;
return true;
}
function change(v){
var str="0";
for(i=0;i<v;i++){ str+=("_"+(document.getElementById(s[i]).selectedIndex-1));};
var ss=document.getElementById(s[v]);
with(ss){
length = 0;
options[0]=new Option(opt0[v],opt0[v]);
if(v && document.getElementById(s[v-1]).selectedIndex>0 || !v)
{
if(dsy.Exists(str)){
ar = dsy.Items[str];
for(i=0;i<ar.length;i++)options[length]=new Option(ar[i],ar[i]);
if(v)options[1].selected = true;
}
}
if(++v<s.length){change(v);}
}
}
var dsy