Is multi selected field - Node.js HTML

Node.js examples for HTML:Select Option

Description

Is multi selected field

Demo Code

/*************************????????*************************************/
function isMultiSelected(field){
  var sel = false;
  var objs = document.getElementsByName(field);
  if(null == objs || typeof(objs)=='undefined'){
    return;/* www .  ja  va2  s .co m*/
  }
  for(var i=0;i<objs.length;i++){
    if(0 < objs[i].options.length){
      sel = true;
    }
  }
  return sel;
}

Related Tutorials