$(function(){
$("#areas").attr("disabled","disabled").css("background-color","#EEEEEE;");
## ** var json=JSON.stringify(${AREASHOP_MAP }); // json 数据 **
html = JSON.parse(json);
for(var i=0;i<html.length;i++){
var sel= document.getElementById("province");
sel.options.add(new Option(html[i].text,html[i].text));
}
//选中区域,加载商家列表
function getListOne(){
$("#shop").attr("disabled","disabled").css("background-color","#EEEEEE;");
var value=document.getElementById('province').value;
if(document.getElementById('town')!=null){
document.getElementById('town').length=1;//清空select,保留第一条
}
if(value!=""){
for(var i=0;i<html.length;i++){
if(html[i].text==value){
for(var j=0;j<html[i].children.length;j++){
var sel= document.getElementById("town");
sel.options.add(new Option(html[i].children[j].text,html[i].children[j].text));
}
}
}
}
}
});
标记的地方一直报错,缺少花括号,但是不影响执行。不知道是什么鬼。
validation已经全部取消勾选,还是报错。