PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <form name="modelform">
- <td valign=top><select class=select onchange="modelform_rebuild(this.options[this.selectedIndex].value)"><option value="0">---
- <option value="30">Toyota
- <option value="31">Nissan
- <option value="33">Mitsubishi
- </select>
- <select name="models_id" class=select><option value="0">---</select>
- <script language="javascript">
- function modelform_rebuild(b){
- switch (b) {
- case '0':
- with (modelform.models_id) {
- options.length = 0;
- options[0] = new Option('---', '0');
- selectedIndex = 0;
- }; break;
- case '30': with (modelform.models_id) {
- options.length= 0;
- options[0]= new Option('---','0');
- options[1]= new Option('Allex','479');
- options[2]= new Option('Allion','424');
- options[3]= new Option('Alphard','489');
- selectedIndex=0;
- }; break;
- case '31': with (document.modelform.models_id) {
- options.length= 0;
- options[0]= new Option('---','0');
- options[1]= new Option('180SX','630');
- options[2]= new Option('Ad Wagon','637');
- options[3]= new Option('Atlas','1033');
- options[4]= new Option('Avenir','638');
- options[5]= new Option('Bassara','607');
- selectedIndex=0;
- }; break;
- case '33': with (document.modelform.models_id) {
- options.length= 0;
- options[0]= new Option('---','0');
- options[1]= new Option('Airtrek','862');
- options[2]= new Option('Aspire','885');
- options[3]= new Option('Bravo','855');
- selectedIndex=0;
- }; break;
- }
- }
- </script>