0
我有一个选择框调用'ToLB',它从另一个选择框中获取值项目。我需要从'ToLB'中提取这些选定的值并将其打印在标签上,这就是我如何做的,但显然它不工作,因为没有任何错误信息,但没有打印到标签上,敬请建议,谢谢! :Javascript +从选择框中打印值
选择框:
<select multiple size="8" name="ToLB" style="width: 135px" onblur="javascript:dropValue6(this)">
</select>
标签:
QMType: <asp:Label ID="destinationQualMemType" runat="server" ></asp:Label >
JavaScript函数:
function dropValue6(source) {
while (source.selectedIndex != -1)
{
if (source.selectedIndex != 0) arSelected.push(source.options[source.selectedIndex].value);
source.options[source.selectedIndex].selected = false;
var i;
for (i = 0; i < arSelected; i++) {
document.getElementById('<%= destinationSpendingType.ClientID %>').innerHTML =
+ "\n" + document.getElementById('<%= destinationSpendingType.ClientID %>').innerHTML = arSelected[i].value;
}
}
}