Javascript操作完istBox, 服务器端的ITEMS里取不到?
function MoveAll(fromListId, toListId)
{
var fromList = document.getElementById(fromListId)
var toList = document.getElementById(toListId);
while(fromList.hasChildNodes())
{
var firstNode = fromList.firstChild;
fromList.removeChild(firstNode);
toList.appendChild(firstNode);
}
}
function MoveSelected(fromListId, toListId)
{
var fromList = document.getElementById(fromListId)
var toList = document.getElementById(toListId);
var refOption;
for(i=fromList.childNodes.length -1; i > -1; i--)
{
var optionNode = fromList.childNodes[i];
if(optionNode.selected)
{
fromList.removeChild(optionNode);
if(refOption)
toList.insertBefore(optionNode,refOption);
else
toList.appendChild(optionNode);
refOption = optionNode;
}
}
}
代码如上,移动是没问题的,但是提交到服务器端,LISTBOX。ITEMS里没有,为什么?如何解决?