日期:2014-05-16 浏览次数:20401 次
//根据AJAX值 赋值次级select的值 ||arrayId 次级需要赋值的sleect表 ||ajaxUrl ajax请求地址 ||ajaxdata 传送的数 function assignSelect(arrayId,ajaxUrl,ajaxdata){ for(var i =0;i<arrayId.length;i++){ removeAll(arrayId[i]);//移除option addOneOption(arrayId[i]); if(i==0&&ajaxdata!="0"){ ajaxSelect(arrayId[i],ajaxUrl,ajaxdata); } } } //删除所有的option列 function removeAll(selectId){ $("#"+selectId).empty(); } //添加一列请选择 function addOneOption(selectId){ $("#"+selectId).append("<option value='0'>请选择</option>"); }
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/tour/global.css"> <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/tour/layout.css"> <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/tour/member.css"> <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/table.css"/> <link rel="stylesheet" type="text/css" href="__PUBLIC__/js/uploadify/uploadify.css"> <script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="__PUBLIC__/js/formselectset.js"></script> <script type="text/javascript" src="__PUBLIC__/js/uploadify/jquery.uploadify-3.1.min.js"></script> <script type="text/javascript" src="__PUBLIC__/js/formValidator-4.0.1.min.js" charset="UTF-8"></script> <script type="text/javascript" src="__PUBLIC__/js/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="__PUBLIC__/js/My97DatePicker/WdatePicker.js" language="javascript"></script>
alert("aaa");