SoFunction
Updated on 2025-04-08

js automatically finds the menu of select drop-down and selects (sample code)


function find_select(name)
{
 var select = (name);
 var find_str = ('to_find_str').value;
 if(select)
 {
  select = select[0];
  var child = ;
  var can=false,text='',len=,is_end=true;
  for(var i=0;i<len;i++)
  {
   if(can)
   {
    text = child[i].text;
    if( text &&
     (find_str)!=-1)
    {
     //(text);
     child[i].selected = true;
     var v = child[i].value;
      = v;
     (v);
     is_end = false;
     break;
    }
   }
   if(child[i].selected)
    can = true;
  }
  if(is_end)
alert('No matching content is available');
 }
}