English
<!--Add the following code to the <body> area--> <script language="javascript"> function aClass(aData, aValue, aText) { if (aClass.arguments.length < 3) alert("Incoming Wrong parameter! ") else { this.Data = aData; this.Value = aValue; this.Text = aText; } } function chgDnCombobox(aSrc, aDes, aClass, aRemain){ if (chgDnCombobox.arguments.length < 3) alert ("The parameter passed in is wrong!") else if (aSrc.type != "select-one") alert("The parameter passed in is wrong!") else if (aClass == null) alert("aClass is not defined error ! ") else { if (aRemain==null) aRemain = 1; chgDnComboboxItem(aSrc.options[aSrc.selectedIndex].value, aDes, aClass, aRemain); } } function chgDnComboboxItem(aValue, aDes, aClass, aRemain){ if (chgDnComboboxItem.arguments.length<3) alert("Error in passing parameters!") else if (aClass==null) alert("Error! aClass is not defined!") else{ if (aRemain==null) aRemain = 1; deleteAllComboboxItem(aDes, aRemain); for (var i=0; i<aClass.length; i++) if (aClass[i].Data==aValue) /* check aClass[i].Data */ if (aClass [i].Data!="") addComboboxItem(aDes, aClass[i].Text, aClass[i].Value); } } function deleteAllComboboxItem(aList, aRemain) { for (var i=aList.options.length; i > aRemain-1; i--) aList.options[i] = null; } function addComboboxItem(aList, aText, aValue) { var aOption = new Option(aText, aValue); eval("aList.options[aList. options.length]=aOption"); } </script> <table width="300" border="0" cellspacing="0" cellpadding="5"> <tr> <form name="myform" onSubmit=" return noerror(myform)" method="post" action="youraction_script"><td height="16" valign="top" bgcolor="#CCCC99"> <div align="center"><span class="title ">Display:</span> <select name="CountryGroup" size=1 onChange='change_area(document.myform)'> <option value="domestic">domestic</option> <option value="foreign"> Abroad</option> </select> <select name="City" size=1> <option value="Beijing">Beijing</option> <option value="Guangdong">Guangdong</option> <option value= "Guangxi">Guangxi</option> <option value="Shanghai">Shanghai</option> <option value="Fujian">Fujian</option> <option value="Tianjin">Tianjin</option> <option value="Hunan">Hunan</option> <option value="Hubei">Hubei</option> <option value="Zhejiang">Zhejiang</option> <option value="Hebei">Hebei</option> <option value="Shandong">Shandong</option> <option value="Sichuan">Sichuan</option> <option value="Anhui">Anhui</option> <option value="Liaoning">Liaoning</ option> <option value="Jiangsu">Jiangsu</option> <option value="Gansu">Gansu</option> <option value="Qinghai">Qinghai</option> <option value="Jiangxi">Jiangxi </option> <option value="Ningxia">Ningxia</option> <option value="Shanxi">Shanxi</option> <option value="Yunnan">Yunnan</option> <option value="Jilin" >Jilin</option> <option value="Henan">Henan</option> <option value="Shaanxi">Shaanxi</option> <option value="Heilongjiang">Heilongjiang</option> <option value=" Guizhou">Guizhou</option> <option value="Hainan">Hainan</option> <option value="Xinjiang">Xinjiang</option> <option value="Inner Mongolia">Inner Mongolia</option> <option value ="Tibet">Tibet</option> <option value="Hong Kong">Hong Kong</option> <option value="Taiwan">Taiwan</option> </select> </div> </td></ form></tr></table> <script language="javascript"> function onchg(aForm) { onchg(document.myform);} var f_Set0 = new Array(new aClass('domestic', 'Beijing', ' Beijing'), new aClass('domestic', 'Guangdong', 'Guangdong'), new aClass('domestic', 'Guangxi', 'Guangxi'), new aClass('domestic', 'Shanghai', 'Shanghai' ), new aClass('domestic', 'Fujian', 'Fujian'), new aClass('domestic', 'Tianjin', 'Tianjin'), new aClass('domestic', 'Hunan', 'Hunan'), new aClass('domestic', 'Hubei', 'Hubei'), new aClass('domestic', 'Zhejiang', 'Zhejiang'), new aClass('domestic', 'Hebei', 'Hebei'), new aClass ('domestic', 'Shandong', 'Shandong'), new aClass('domestic', 'Sichuan', 'Sichuan'), new aClass('domestic', 'Anhui', 'Anhui'), new aClass(' Domestic', 'Liaoning', 'Liaoning'), new aClass('Domestic', 'Jiangsu', 'Jiangsu'), new aClass('Domestic', 'Gansu', 'Hebei'), new aClass('Domestic' , 'Qinghai', 'Shandong'), new aClass('domestic', 'Jiangxi', 'Jiangxi'), new aClass('domestic', 'Ningxia', 'Ningxia'), new aClass('domestic', ' Shanxi', 'Shanxi'), new aClass('domestic', 'Jiangxi', 'Jiangxi'), new aClass('domestic', 'Yunnan', 'Yunnan'), new aClass('domestic', 'Jilin' , 'Jilin'), new aClass('domestic', 'Henan', 'Henan'), new aClass('domestic', 'Shaanxi', 'Shaanxi'), new aClass('domestic', 'Heilongjiang', ' Heilongjiang'), new aClass('domestic', 'Guizhou', 'Guizhou'), new aClass('domestic', 'Hainan', 'Hainan'), new aClass('domestic', 'Xinjiang', 'Xinjiang' ), new aClass('domestic', 'Inner Mongolia', 'Inner Mongolia'), new aClass('domestic', 'Tibet', 'Tibet'), new aClass('domestic', 'Hong Kong', 'Hong Kong'), new aClass('domestic', 'Taiwan', 'Taiwan'), new aClass('foreign', 'United States', 'United States'), new aClass('foreign', 'Japan', 'Japan'), new aClass ('foreign', 'UK', 'UK'), new aClass('foreign', 'France', 'France'), new aClass('foreign', 'Italy', 'Italy'), new aClass(' foreign', 'Germany', 'Germany'), new aClass("End", "End", "End")); function change_area(aForm) { chgDnCombobox(aForm.CountryGroup, aForm.City, f_Set0, 0) } </script>