Non-Ajax achieves level-2 Interaction

Source: Internet
Author: User

AJAX can achieve level-2 interaction, but small level-2 interaction can be implemented without Ajax.

 

<Form onsubmit = "Return checkform (this)" name = "gengxinxx_form1" method = "Post" Action = "xmqkdo. jsp"> </P> <p> ...... </P> <p> <script language = "JavaScript" type = "text/JavaScript"> </P> <p> var city = [</P> <p> ["a91 mechatronics ", "a92 general machinery and equipment", "a93 chemical machinery", "a94 instruments"], </P> <p> ["A11 network", "A12 communication ", "A13 computer hardware", "A14 computer software", "A15 automatic control", "A16 electronics and other"], </P> <p> ["a41 inorganic materials ", "a42 organic materials", "A43 metal materials", "A51 inorganic chemicals", "A52 organic chemicals", "A53 Fine Chemicals", "A54 catalysis ", "A55 Chemical Engineering and Technology", "c22 Environmental Protection Technology", "C23 environmental protection equipment"], </P> <p> ["A21 new energy ", "A22 energy-saving technologies and other", "A30 traffic (roads, bridges, etc.)", "a81 building materials", "a82 urban construction", "C21 Resource Development and Utilization ", "c52 Lingang Industry", "c60public safety and disaster prevention and mitigation"], </P> <p> ["A61 textile fabrics", "a62 printing and dyeing", "a71 leather plastic ", "a72 food", "a73 other Light Industrial Products", "a95 Textile Machinery"], </P> <p> ["B11 grain and oil crops", "B12 cash crops ", "B13 planting", "b31 forestry", "B32 forest specialty", "B33 forestry processing"], </P> <p> ["B21 Marine Fisheries ", "B22 freshwater fisheries", "B23 fishery processing", "b41 livestock and poultry breeding", "B49 other animal husbandry", "C51 breeding and fishing"], </P> <p> ["C11 surgery", "C12 internal medicine", "C13 comprehensive medicine and other"], </P> <p> ["C14 biopharmaceutical", "C15 chemical Pharmaceuticals", "C16 traditional Chinese medicine", "C17 traditional Chinese medicine, natural medicine", "18 Medical Devices"], </P> <p> ["D10 soft science"], </P> <p>]; </P> <p> function getcity () {</P> <p> // obtain the object from the province drop-down list </P> <p> var sltprovince = document. gengxinxx_form1.xk_kgno; </P> <p> // obtain the object from the city drop-down list </P> <p> var sltcity = document. gengxinxx_form1.xk_majorname3; </P> <p> // obtain the city array of the corresponding province </P> <p> var provincecity = City [sltprovince. selectedindex]; </P> <p> // clear the city drop-down list, leaving only the prompt option </P> <p> sltcity. length = 1; </P> <p> // fill the value in the city array in the city drop-down list </P> <p> for (VAR I = 0; I <provincecity. length; I ++) {</P> <p> sltcity [I + 1] = New Option (provincecity [I], provincecity [I]. substring (0, 3); </P> <p >}</P> <p> </: SCRIPT> </P> <p> <TD colspan = "2"> * Review Team </TD> <br/> <TD colspan = "3"> <br/> <SQL: query Var = "majorgrp" datasource = "$ {sb_db}"> <br/> select xk_kgno, xk_chdescr from 'C _ xk_majorgrp </SQL: query> </P> <p> <select name = "xk_kgno" onchange = "getcity () "> <br/> <option> select a review group </option> <br/> <C: foreach Var =" row_gr "items =" $ {majorgrp. rows} "> <br/> <option value =" $ {row_gr.xk_kgno} ">$ {row_gr.xk_chdescr} </option> <br/> </C: foreach> </SELECT> <br/> </TD> <br/> <TD> * Technology Management field </TD> <br/> <TD colspan = "3"> <br/> <select name = "xk_majorname3"> <br/> <option> select the technology management field </option> <br/> </SELECT> </TD> <br/> </tr> <br/> <tr> <br/>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.