代码如下 | 复制代码 |
<script language="javascript"> subcat = new Array(); subcat[0] = new Array("D530","1","3"); subcat[1] = new Array("D539","1","4"); subcat[2] = new Array("E239","1","5"); subcat[3] = new Array("N930","1","6"); subcat[4] = new Array("W711","1","7"); subcat[5] = new Array("W721","1","8"); subcat[6] = new Array("MINI5","2","9"); subcat[7] = new Array("STREAK7","2","10"); subcat[8] = new Array("VENUE","2","11"); var onecount=subcat.length; function changelocation(locationid) { document.search.tid.length = 1; var locationid=locationid; var i; var nindex; for (i=0;i < onecount; i++) { if (subcat[i][1] == locationid) { document.search.tid.options[document.search.tid.length] = new Option(subcat[i][0], subcat[i][2]); } } } function doChange(objText, objDrop) { if (!objDrop) return; var str = objText.value; var arr = str.split("|"); var nIndex = objDrop.selectedIndex; objDrop.length=1; for (var i=0; i<arr.length; i++){ objDrop.options[objDrop.length] = new Option(arr[i], arr[i]); } objDrop.selectedIndex = nIndex; } </script> <form id="search" name="search" method="post" > |
时间: 2024-10-01 21:56:54