Make three-eye judgment on dom

ask for help!

"+v["name"]+"</option>"; << 
Mar.12,2021

just add

var pid = "{$vo['bm_scheme_cid']['pid']}";  //23  
var phtml = '<option value=""></option>';
$.each(citylist,function(i,v){
     phtml += '<option value="'+v['id']==pid?'selected':''+'">'+v['name']+'</option>';
});
$("select[name='backmoney_basetpl_pid']").html(phtml);

just to be on the safe side

var pid = "{$vo['bm_scheme_cid']['pid']}";  //23  
var phtml = '<option value=""></option>';
$.each(citylist,function(i,v){
  if (v['id']===pid) {
    phtml += '<option value="'+v['id']+'" selected >'+v['name']+'</option>';
  } else {
    phtml += '<option value="'+v['id']+'">'+v['name']+'</option>';
  }
     
});
$("select[name='backmoney_basetpl_pid']").html(phtml);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1beadff-31a53.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1beadff-31a53.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?