<HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <STYLE> BODY, SELECT { FONT-FAMILY: TIMES NEW ROMAN; FONT-SIZE: 10PT; } </STYLE> <SCRIPT LANGUAGE="JavaScript"> <!-- window.onload = initPage; function initPage() { btnPutUp.onclick = putUp; btnPutDown.onclick = putDown; btnGoUp.onclick = goUp; btnGoDown.onclick = goDown; } function putUp() { var strTempValue; var strTempText; var intCurIndex; intCurIndex = sltFruit.selectedIndex; //alert("intCurIndex: " + intCurIndex); if (intCurIndex > 0) { strTempValue= sltFruit.options.item(intCurIndex).value; strTempText = sltFruit.options.item(intCurIndex).text; //alert(strTempText + " - " + strTempValue); sltFruit.options.item(intCurIndex).value = sltFruit.options.item(intCurIndex - 1).value; sltFruit.options.item(intCurIndex).text = sltFruit.options.item(intCurIndex - 1).text; |