for (var i = 0; i <= dealVar.length; i++) { if (dealVar[i]!=null && dealVar[i].contains('key')) { var option = document.createElement('option'); var str = dealVar[i].split(','); var str1 = str[0].split(':'); var str2 = dealVar[i+1].split(':'); option.setAttribute('value', str1[1]); option.appendChild(document.createTextNode(str2[1])); element1.appendChild(option); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)