<select id="product" > </select>
for(var i = 0; i < results.length; i++) {
option = document.createElement("option");//创建下拉框元
option.appendChild(document.createTextNode(results[i].firstChild.nodeValue));//将servlet返回的记录集的值加入option product.appendChild(option);//将option加到product下拉框中
}
我用ajax加了select的option
如何给option 加个id啊
for(var i = 0; i < results.length; i++) {
option = document.createElement("option");//创建下拉框元
option.appendChild(document.createTextNode(results[i].firstChild.nodeValue));//将servlet返回的记录集的值加入option product.appendChild(option);//将option加到product下拉框中
}
我用ajax加了select的option
如何给option 加个id啊
optionA=new Option("--请选择市--","0");