Select Option操作
function Up(question_id){
var vintSelCount = 0;
var vobjCboLeft = question_id;
for (var i = 0; i < vobjCboLeft.length; i++)
if (vobjCboLeft(i).selected)
vintSelCount++;
if (vintSelCount != 0)
{
if (vobjCboLeft.selectedIndex != 0)
{
var vintSelIndex = vobjCboLeft.selectedIndex;
vobjCboLeft.options.add(new Option(vobjCboLeft(vintSelIndex).text, vobjCboLeft(vintSelIndex).value), vintSelIndex - 1);
vobjCboLeft.options[vintSelIndex + 1] = null;
vobjCboLeft(vintSelIndex - 1).selected = true;
}
}
}
//??:??
function Down(question_id){
var vintSelCount = 0;
var vobjCboLeft = question_id;
for (var i = 0; i < vobjCboLeft.length; i++)
if (vobjCboLeft(i).selected)
vintSelCount++;
if (vintSelCount != 0)
{
if (vobjCboLeft.selectedIndex != vobjCboLeft.length - 1)
{
var vintSelIndex = vobjCboLeft.selectedIndex;
vobjCboLeft.options.add(new Option(vobjCboLeft(vintSelIndex).text, vobjCboLeft(vintSelIndex).value), vintSelIndex + 2);
vobjCboLeft.options[vintSelIndex] = null;
vobjCboLeft(vintSelIndex + 1).selected = true;
}
}
}



浙公网安备 33010602011771号