我有一个如下所示的多重选择组合框。
我需要存储所有选择的项目,比如这个字符串Very Cold :+: Very Hot
<select name="MilkShake" id="MilkShake" onchange="changeselectItems(this,'MilkShake');">
<option value="Very Cold">Very Cold </option>
<option value="Very Hot">Very Hot </option>
<option value="Med Size">Med Size </option>
<option value="Large Size">Large Size </option>
<option value="1 by 2">1 by 2 </option>
<option value="1 by 4">1 by 4 </option>
<option value="2 by 3">2 by 3 </option>
<option value="Glass">Glass </option>
</select>
我试过使用这个功能
function changeselectItems(ref,miniproname)
{
var ref = ref.value;
var newf = Array();
alert(ref);
for(var i=0;i<newexampleitem.length;i++)
{
newf['sel'] = ref[i];
}
}