Html section:
<script type="text/javascript" src="/js/jquery.js"></script><script type="text/javascript" src="/js/cxjl.js"></script><script type="text/javascript" src="/js/jquery_duoxuan1.js"></script>MYTITLE
Jquery section:
<Script type = "text/javascript"> $ (document ). ready (function () {// linkage drop-down menu $ ("# college "). load ("/dyjsdp/college"); $ ("# college "). change (function () {$ ("# major "). load ("/dyjsdp/major", "college =" + $ (this ). val () ;}); $ ("# major "). change (function () {$ ("# classes "). load ("/dyjsdp/class", "major =" + $ (this ). val () ;}); </script>
Zend framework:// Public function collegeAction () {// header ("Content-Type: text/html; charset = UTF-8"); header ("Cache-Control: no-cache "); $ colleges = new College (); $ res = $ colleges-> fetchAll (); echo"-- Select a school --"; Foreach ($ res as $ college) {echo"". $ College ['name']."";}Exit () ;}// professionally linked public function majexception () {// header (" Content-Type: text/xml; charset = UTF-8 "); header ("Cache-Control: no-cache"); $ college = $ this-> getRequest ()-> getParam ("college"); // file_put_contents ("G: /php/myenv/mylog. log ", $ college); $ majors = new Major (); $ db = $ majors-> getAdapter (); $ SQL = $ db-> quoteInto (" select m. name from college c, major m where c. id = m. college_id and c. name =? ", $ College); $ res = $ db-> query ($ SQL)-> fetchAll (); echo"--- Select a major ---"; Foreach ($ res as $ major) {echo"". $ Major ['name']."";}Exit ();}