直接上代码
a1 = "张楠"; //姓名
a2 = "13011223344"; //手机号
a3 = "231024191101020099"; //身份证号
a9 = "2023-11-30"; //兑换日期
area1 = "黑龙江";
area2 = "牡丹江";
area3 = "东宁";
area4 = "支行营业室";
$("#name").val(a1);
$("#identNo").val(a2);
$("#mobile").val(a3);
$("#coindate").val(a9);
//-----------------------------------------
org1 = document.getElementById('orglevel1');
for( i=0;i<org1.length;i++){
if( org1.options[i].text.indexOf(area1)!=-1 ){
org1.selectedIndex = i;
break;
}
}
$("#orglevel1").trigger("change");
//-----------------------------------------
org2 = document.getElementById('orglevel2');
for( i=0;i<org2.length;i++){
if( org2.options[i].text.indexOf(area2)!=-1 ){
org2.selectedIndex = i;
break;
}
}
$("#orglevel2").trigger("change");
//-----------------------------------------
org3 = document.getElementById('orglevel3');
for( i=0;i<org3.length;i++){
if( org3.options[i].text.indexOf(area3)!=-1 ){
org3.selectedIndex = i;
break;
}
}
$("#orglevel3").trigger("change");
//-----------------------------------------
org4 = document.getElementById('orglevel4');
for( i=0;i<org4.length;i++){
if( org4.options[i].text.indexOf(area4)!=-1 ){
org4.selectedIndex = i;
break;
}
}
懂的就拿走吧
发表评论