PHP+Ajax+JS three-level linkage between provinces and municipalities_PHP tutorial

WBOY
Release: 2016-07-13 10:29:31
Original
669 people have browsed it

The basic idea is: dynamically create the option of the select control in JS, and obtain the province and city information obtained from the SQL database in PHP through Ajax. The code is a bit long, but many of them are similar. , for example, the methods for obtaining provinces, cities, and districts in JS are similar, and in PHP, different select statements are executed through different parameters.

index.html code:

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >


PHP+Ajax to get SQL database</ title><br> <META http-equiv=Content-Type content="text/html; charset=gb2312"><br> <script src="scripts/thumbnails.js" type="text/javascript" ></script><br></head></p> <p><body></p> <p> <div id="description"><br> <select><strong>thumbnails.js code: </strong></span> ​ ​ window.onload = getProvince; ​ function createRequest() {//Ajax requires objects for PHP interaction try { Request = new XMLHttpRequest();//Create a new request object; } catch (tryMS) { Try { Request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (otherMS) {          try { ​​​​request = new ActiveXObject("Microsoft.XMLHTTP");         } catch (failed) { ​​​​request = null; } } } return request; } ​ function sech(id) {//Triggered when province and city change, select onchange event ​ var aa = document.getElementById(id); if(id=="sheng"){ GetCity(aa.value);//Here aa.value is the id of the province } if(id=="shi") { getCounty(aa.value);//here aa.value is the id of the city } ​ } ​ function getProvince() {//Get all provinces request = createRequest(); if (request == null) { alert("Unable to create request"); Return; } var url= "getDetails.php?ID=0";//When ID=0 is passed to PHP, let it get all provinces request.open("GET", url, true); request.onreadystatechange = displayProvince; //Set the callback function request.send(null); //Send request } ​ function getCity(id){//Get the city corresponding to the province request = createRequest(); if (request == null) { alert("Unable to create request"); Return; } var url= "getDetails.php?ID=" + escape(id); request.open("GET", url, true); request.onreadystatechange = displayCity; request.send(null); } ​ function getCounty(id){//Get the district corresponding to the city request = createRequest(); if (request == null) { alert("Unable to create request"); Return; } var url= "getDetails.php?ID=" + escape(id); request.open("GET", url, true); request.onreadystatechange = displayCounty; request.send(null); } ​ ​ function displayProvince() {//Dynamicly add the acquired data to select if (request.readyState == 4) { If (request.status == 200) { var a=new Array; var b=request.responseText;//Assign the data returned by PHP to b a=b.split(",");//Save this data in array a through "," document.getElementById("sheng").length=1; var obj=document.getElementById("sheng'); for(i=0;i Obj.options.add(new Option(a[i],i+1)); //Dynamicly generate OPTION and add it to select. The first parameter is Text and the second parameter is Value. ​ } } } ​ ​ function displayCity() {//Dynamicly add the acquired data to select if (request.readyState == 4) { If (request.status == 200) { var a=new Array; var b=request.responseText; a=b.split(","); document.getElementById("shi").length=1;//Reselect document.getElementById("xian").length=1; //Reselect if(document.getElementById("sheng").value!="province"){ var obj=document.getElementById('shi'); for(i=0;i obj.options.add(new Option(a[i], document.getElementById("sheng").value*100+i+1)); //ocument.getElementById("sheng").value*100+i+ 1 corresponds to the city ID. } ​​ } } } ​ function displayCounty() {//Add the obtained data to select if (request.readyState == 4) { If (request.status == 200) { var a=new Array; var b=request.responseText; a=b.split(","); document.getElementById("xian").length=1; if(document.getElementById("sheng").value!="province"&&document.getElementById("shi").value!="city"){ var obj=document.getElementById('xian'); for(i=0;i Obj.options.add(new Option(a[i],i+1001)); } ​​ } } } ​ <span><strong>getDetails.php code: </strong></span> ​ <p><?php<br /> header("Content-Type: text/html; charset=gb2312");<br /> $conn = new COM("ADODB.Connection") or die("Cannot start ADO" );<br />$connstr = "Provider=SQLOLEDB;Persist Security Info=False;User ID=sa;Password=zzh;Initial Catalog=NoteBook;Data Source=localhost"; <br /> <br />if($_REQUEST['ID']= =0){//Get the list of provinces<br />$conn->Open($connstr); //Establish a database connection<br> $sqlstr = "select name from Province"; //Set the query string<br> $rs = $conn->Execute($sqlstr); //Execute the query to obtain the results<br> $num_cols = $rs->Fields->Count(); //Get the number of columns in the data set<br> $ Province=array();<br> $i=0;<br> while (!$rs->EOF) {<br> $Province[$i]=$rs->Fields['name']- >Value.","; <br> $rs->MoveNext(); <br> $i++; <br> }<br> foreach($Province as $val)<br> echo $val;<br> $conn->Close();<br> $rs = null;<br> $conn = null; <br> }<br> <br> <br> <br>if($_REQUEST['ID' ]>0&&$_REQUEST['ID']<35){//Get the list of cities corresponding to the province<br />$conn->Open($connstr); //Establish a database connection<br> $sqlstr = " select name from City where cid=".$_REQUEST['ID']; //Set query string<br> $rs = $conn->Execute($sqlstr); //Execute query to get results<br> $ num_cols = $rs->Fields->Count(); //Get the number of columns in the data set<br> $City=array();<br> $i=0;<br> while (!$rs-> ;EOF) {<br> $City[$i]=$rs->Fields['name']->Value.","; <br> $rs->MoveNext(); <br> $ i++; <br> }<br> foreach($City as $val)<br> echo $val;<br> $conn->Close();<br> $rs = null;<br> $conn = null; <br> }<br> <br> <br> <br>if($_REQUEST['ID']>100){//Get the county list corresponding to the province and city<br>$conn->Open ($connstr); //Establish a database connection<br> $sqlstr = "select name from County where cid=".$_REQUEST['ID']; //Set the query string<br> $rs = $conn-> ;Execute($sqlstr); //Execute the query to get the results<br> $num_cols = $rs->Fields->Count(); //Get the number of columns in the data set<br> $County=array();<br> $i=0;<br> while (!$rs->EOF) {<br> $County[$i]=$rs->Fields['name']->Value."," ; <br> $rs->MoveNext(); <br> $i++; <br> }<br> foreach($County as $val)<br> echo $val;<br> $conn->Close ();<br> $rs = null;<br> $conn = null; <br> }<br>?></p> ​ ​ <span><strong>Database design, tables Province table, City table, County table. </strong></span> Requirements: The Province table requires id and name. The id is recommended to be from 1 to 34. For example, the id of Beijing is 1, the id of Guangdong is 2, and so on; The City table requires id, name and cid. The id is cid*100+1, and the cid is the superior of the city. For example, the superior of Shenzhen is Guangdong Province, and if the cid is 2, the id of Shenzhen is 201, and so on. The County table requires id, name and cid. Because it is a three-level relationship, the id can be arbitrary. It is recommended to increase it from 10001. The cid is the superior level. For example, the cid of Baoan District is 201, and the cid of Longgang District is also 201; ​ ​ <span><strong>Screenshot: </strong></span> ​ HTML effect: <img src="http://www.bkjia.com/uploads/allimg/140525/12395211G-0.jpg" alt=""> The result after completion: <img src="http://www.bkjia.com/uploads/allimg/140525/12395241B-1.jpg" alt=""><img src="http://www.bkjia.com/uploads/allimg/140525/123952MF-2.jpg" alt=""><img src="http://www.bkjia.com/uploads/allimg/140525/123952AH-3.jpg" alt=""> ​ ​ Note: PHP is server-side. It is recommended to debug through IP after publishing the website. <p align="left"></p> <div style="display:none;"> <span id="url" itemprop="url">http://www.bkjia.com/PHPjc/775949.html</span><span id="indexUrl" itemprop="indexUrl">www.bkjia.com</span><span id="isOriginal" itemprop="isOriginal">true</span><span id="isBasedOnUrl" itemprop="isBasedOnUrl">http: //www.bkjia.com/PHPjc/775949.html</span><span id="genre" itemprop="genre">TechArticle</span><span id="description" itemprop="description">The basic idea is: dynamically create the option of the select control in JS, and obtain the province obtained from the SQL database in PHP through Ajax Urban information, the code is a bit long, but many are similar, such as JS Zhongsheng...</span> </div> <div class="art_confoot"></div> </div> </div> <div style="height: 25px;"> <div class="wzconBq" style="display: inline-flex;"> <span>Related labels:</span> <div class="wzcbqd"> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=js" target="_blank">js</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=php" target="_blank">php</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=select" target="_blank">select</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=sql" target="_blank">sql</a> </div> </div> <div style="display: inline-flex;float: right; color:#333333;">source:php.cn</div> </div> <div class="wzconOtherwz"> <a href="http://www.php.cn/faq/295383.html" title="PHP tips: How to use the JS and CSS optimization tool Minify_PHP tutorial"> <span>Previous article:PHP tips: How to use the JS and CSS optimization tool Minify_PHP tutorial</span> </a> <a href="http://www.php.cn/faq/295385.html" title="A brief analysis of a bug in PHP function strip_tags_PHP Tutorial"> <span>Next article:A brief analysis of a bug in PHP function strip_tags_PHP Tutorial</span> </a> </div> <div class="wzconShengming"> <div class="bzsmdiv">Statement of this Website</div> <div>The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn</div> </div> <div class="wwads-cn wwads-horizontal" data-id="156" style="max-width:955px"></div> <div class="wzconZzwz"> <div class="wzconZzwztitle">Latest Articles by Author</div> <ul> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796626602.html">Unlocking the World of C: Your First Steps in Systems Programming</a> </div> <div>2024-10-09 22:27:01</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796626539.html">From Beginner to Builder: Mastering the Art of PHP Programming</a> </div> <div>2024-10-09 20:15:31</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796626401.html">Master the Basics: C Programming for Absolute Beginners</a> </div> <div>2024-10-09 16:42:41</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796626348.html">PHP Forms: Handling User Input Like a Pro</a> </div> <div>2024-10-09 16:12:01</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796626255.html">C: The Language That Built Modern Computing (and You Can Learn It!)</a> </div> <div>2024-10-09 13:33:51</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796626233.html">PHP for Absolute Beginners: No Coding Experience Required</a> </div> <div>2024-10-09 12:27:11</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796626219.html">Your C Programming Cheerleaders: Support and Resources for Beginners</a> </div> <div>2024-10-09 12:00:03</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796626131.html">Tame the Code Monster: A Fun and Friendly Approach to PHP</a> </div> <div>2024-10-09 11:03:31</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612210.html">BlackRock Labels BTC a Unique Diversifier</a> </div> <div>2024-09-20 15:51:33</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612202.html">Internet Computer (ICP) Price Prediction: Will ICP Price Hit $24?</a> </div> <div>2024-09-20 15:47:32</div> </li> </ul> </div> <div class="wzconZzwz"> <div class="wzconZzwztitle">Latest Issues</div> <div class="wdsyContent"> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/176381.html" target="_blank" title="Can a workerpool declared in multiple routes still maintain its cpu usage without caring about the threshold" class="wdcdcTitle">Can a workerpool declared in multiple routes still maintain its cpu usage without caring about the threshold</a> <a href="http://www.php.cn/wenda/176381.html" class="wdcdcCons">I'm hoping to find a node.js system with a workerpool to handle CPU intensive tasks, but I...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 19:54:23</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>444</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/176368.html" target="_blank" title="Scatterplot points do not maintain values ​​when zooming in d3.js" class="wdcdcTitle">Scatterplot points do not maintain values ​​when zooming in d3.js</a> <a href="http://www.php.cn/wenda/176368.html" class="wdcdcCons">This is my first time using d3.js, so please bear with me. I implemented it as pure JavaSc...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 18:16:26</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>403</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/176350.html" target="_blank" title="Show hidden side panels: checked" class="wdcdcTitle">Show hidden side panels: checked</a> <a href="http://www.php.cn/wenda/176350.html" class="wdcdcCons">I would like to have a navigation menu in the side panel with the ability to switch to vie...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 15:49:33</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>319</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/176329.html" target="_blank" title="Should we use SSG to deploy dashboards created with Nuxt.js?" class="wdcdcTitle">Should we use SSG to deploy dashboards created with Nuxt.js?</a> <a href="http://www.php.cn/wenda/176329.html" class="wdcdcCons">We will develop a dashboard for internal use using Nuxt.js. Since this will be an internal...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 13:17:44</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>493</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/176311.html" target="_blank" title="Electron gets AppData on preload" class="wdcdcTitle">Electron gets AppData on preload</a> <a href="http://www.php.cn/wenda/176311.html" class="wdcdcCons">How to get the preloaded AppData directory? Background.js[...]asyncfunctioncreateWindow(){...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 11:05:31</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>417</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> </div> </div> <div class="wzconZt" > <div class="wzczt-title"> <div>Related Topics</div> <a href="http://www.php.cn/faq/zt" target="_blank">More> </a> </div> <div class="wzcttlist"> <ul> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/jszzbds"><img src="https://img.php.cn/upload/subject/202407/22/2024072214413954023.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="js regular expression" /> </a> <a target="_blank" href="http://www.php.cn/faq/jszzbds" class="title-a-spanl" title="js regular expression"><span>js regular expression</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/jshqdqsj"><img src="https://img.php.cn/upload/subject/202407/22/2024072214282324693.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="js gets current time" /> </a> <a target="_blank" href="http://www.php.cn/faq/jshqdqsj" class="title-a-spanl" title="js gets current time"><span>js gets current time</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/jszfcsz"><img src="https://img.php.cn/upload/subject/202407/22/2024072214253682490.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="js string to array" /> </a> <a target="_blank" href="http://www.php.cn/faq/jszfcsz" class="title-a-spanl" title="js string to array"><span>js string to array</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/jsssmys"><img src="https://img.php.cn/upload/subject/202407/22/2024072214182727205.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="what does js mean" /> </a> <a target="_blank" href="http://www.php.cn/faq/jsssmys" class="title-a-spanl" title="what does js mean"><span>what does js mean</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/phpwjzmdk"><img src="https://img.php.cn/upload/subject/202407/22/2024072214120868901.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="How to open php file" /> </a> <a target="_blank" href="http://www.php.cn/faq/phpwjzmdk" class="title-a-spanl" title="How to open php file"><span>How to open php file</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/jsscjddff"><img src="https://img.php.cn/upload/subject/202407/22/2024072214115932190.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="js method to delete node" /> </a> <a target="_blank" href="http://www.php.cn/faq/jsscjddff" class="title-a-spanl" title="js method to delete node"><span>js method to delete node</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/jsjqzfc"><img src="https://img.php.cn/upload/subject/202407/22/2024072214115739127.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="js method to intercept string" /> </a> <a target="_blank" href="http://www.php.cn/faq/jsjqzfc" class="title-a-spanl" title="js method to intercept string"><span>js method to intercept string</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/jsconcatpush"><img src="https://img.php.cn/upload/subject/202407/22/2024072214081060908.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="The difference between concat and push in JS" /> </a> <a target="_blank" href="http://www.php.cn/faq/jsconcatpush" class="title-a-spanl" title="The difference between concat and push in JS"><span>The difference between concat and push in JS</span> </a> </li> </ul> </div> </div> </div> </div> <div class="phpwzright"> <div class="wzrOne"> <div class="wzroTitle">Popular Recommendations</div> <div class="wzroList"> <ul> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="How to set up hosts on Mac computer (steps with pictures and text)" href="http://www.php.cn/faq/448310.html">How to set up hosts on Mac computer (steps with pictures and text)</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="Quickly build a simple QQ robot with PHP" href="http://www.php.cn/faq/448391.html">Quickly build a simple QQ robot with PHP</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="API common signature verification methods (PHP implementation)" href="http://www.php.cn/faq/448286.html">API common signature verification methods (PHP implementation)</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="Collection of common date and time operations in PHP" href="http://www.php.cn/faq/448309.html">Collection of common date and time operations in PHP</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="PHP generates graphic verification code (enhanced interference type)" href="http://www.php.cn/faq/448308.html">PHP generates graphic verification code (enhanced interference type)</a> </div> </li> </ul> </div> </div> <script src="https://sw.php.cn/hezuo/cac1399ab368127f9b113b14eb3316d0.js" type="text/javascript"></script> <div class="wzrThree"> <div class="wzrthree-title"> <div>Popular Tutorials</div> <a target="_blank" href="http://www.php.cn/course.html">More> </a> </div> <div class="wzrthreelist swiper2"> <div class="wzrthreeTab swiper-wrapper"> <div class="check tabdiv swiper-slide" data-id="one">Related Tutorials <div></div></div> <div class="tabdiv swiper-slide" data-id="two">Popular Recommendations<div></div></div> <div class="tabdiv swiper-slide" data-id="three">Latest courses<div></div></div> </div> <ul class="one"> <li> <a target="_blank" href="http://www.php.cn/course/812.html" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg" alt="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)"/> </a> <div class="wzrthree-right"> <a target="_blank" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" href="http://www.php.cn/course/812.html">The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)</a> <div class="wzrthreerb"> <div>1409534 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="812"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/74.html" title="PHP introductory tutorial one: Learn PHP in one week" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/6253d1e28ef5c345.png" alt="PHP introductory tutorial one: Learn PHP in one week"/> </a> <div class="wzrthree-right"> <a target="_blank" title="PHP introductory tutorial one: Learn PHP in one week" href="http://www.php.cn/course/74.html">PHP introductory tutorial one: Learn PHP in one week</a> <div class="wzrthreerb"> <div>4243087 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="74"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/286.html" title="JAVA Beginner's Video Tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a2bacfd9379.png" alt="JAVA Beginner's Video Tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="JAVA Beginner's Video Tutorial" href="http://www.php.cn/course/286.html">JAVA Beginner's Video Tutorial</a> <div class="wzrthreerb"> <div>2441531 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="286"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/504.html" title="Little Turtle's zero-based introduction to learning Python video tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a67ce3a6655.png" alt="Little Turtle's zero-based introduction to learning Python video tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Little Turtle's zero-based introduction to learning Python video tutorial" href="http://www.php.cn/course/504.html">Little Turtle's zero-based introduction to learning Python video tutorial</a> <div class="wzrthreerb"> <div>500608 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="504"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/2.html" title="PHP zero-based introductory tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/6253de27bc161468.png" alt="PHP zero-based introductory tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="PHP zero-based introductory tutorial" href="http://www.php.cn/course/2.html">PHP zero-based introductory tutorial</a> <div class="wzrthreerb"> <div>839121 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="2"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> <ul class="two" style="display: none;"> <li> <a target="_blank" href="http://www.php.cn/course/812.html" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg" alt="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)"/> </a> <div class="wzrthree-right"> <a target="_blank" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" href="http://www.php.cn/course/812.html">The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)</a> <div class="wzrthreerb"> <div >1409534 times of learning</div> <div class="courseICollection" data-id="812"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/286.html" title="JAVA Beginner's Video Tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a2bacfd9379.png" alt="JAVA Beginner's Video Tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="JAVA Beginner's Video Tutorial" href="http://www.php.cn/course/286.html">JAVA Beginner's Video Tutorial</a> <div class="wzrthreerb"> <div >2441531 times of learning</div> <div class="courseICollection" data-id="286"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/504.html" title="Little Turtle's zero-based introduction to learning Python video tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a67ce3a6655.png" alt="Little Turtle's zero-based introduction to learning Python video tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Little Turtle's zero-based introduction to learning Python video tutorial" href="http://www.php.cn/course/504.html">Little Turtle's zero-based introduction to learning Python video tutorial</a> <div class="wzrthreerb"> <div >500608 times of learning</div> <div class="courseICollection" data-id="504"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/901.html" title="Quick introduction to web front-end development" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/64be28a53a4f6310.png" alt="Quick introduction to web front-end development"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Quick introduction to web front-end development" href="http://www.php.cn/course/901.html">Quick introduction to web front-end development</a> <div class="wzrthreerb"> <div >214712 times of learning</div> <div class="courseICollection" data-id="901"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/234.html" title="Master PS video tutorials from scratch" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62611f57ed0d4840.jpg" alt="Master PS video tutorials from scratch"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Master PS video tutorials from scratch" href="http://www.php.cn/course/234.html">Master PS video tutorials from scratch</a> <div class="wzrthreerb"> <div >866828 times of learning</div> <div class="courseICollection" data-id="234"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> <ul class="three" style="display: none;"> <li> <a target="_blank" href="http://www.php.cn/course/1648.html" title="[Web front-end] Node.js quick start" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662b5d34ba7c0227.png" alt="[Web front-end] Node.js quick start"/> </a> <div class="wzrthree-right"> <a target="_blank" title="[Web front-end] Node.js quick start" href="http://www.php.cn/course/1648.html">[Web front-end] Node.js quick start</a> <div class="wzrthreerb"> <div >5439 times of learning</div> <div class="courseICollection" data-id="1648"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1647.html" title="Complete collection of foreign web development full-stack courses" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/6628cc96e310c937.png" alt="Complete collection of foreign web development full-stack courses"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Complete collection of foreign web development full-stack courses" href="http://www.php.cn/course/1647.html">Complete collection of foreign web development full-stack courses</a> <div class="wzrthreerb"> <div >4150 times of learning</div> <div class="courseICollection" data-id="1647"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1646.html" title="Go language practical GraphQL" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662221173504a436.png" alt="Go language practical GraphQL"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Go language practical GraphQL" href="http://www.php.cn/course/1646.html">Go language practical GraphQL</a> <div class="wzrthreerb"> <div >3568 times of learning</div> <div class="courseICollection" data-id="1646"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1645.html" title="550W fan master learns JavaScript from scratch step by step" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662077e163124646.png" alt="550W fan master learns JavaScript from scratch step by step"/> </a> <div class="wzrthree-right"> <a target="_blank" title="550W fan master learns JavaScript from scratch step by step" href="http://www.php.cn/course/1645.html">550W fan master learns JavaScript from scratch step by step</a> <div class="wzrthreerb"> <div >577 times of learning</div> <div class="courseICollection" data-id="1645"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1644.html" title="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/6616418ca80b8916.png" alt="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours" href="http://www.php.cn/course/1644.html">Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours</a> <div class="wzrthreerb"> <div >18173 times of learning</div> <div class="courseICollection" data-id="1644"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> </div> <script> var mySwiper = new Swiper('.swiper2', { autoplay: false,//可选选项,自动滑动 slidesPerView : 'auto', }) $('.wzrthreeTab>div').click(function(e){ $('.wzrthreeTab>div').removeClass('check') $(this).addClass('check') $('.wzrthreelist>ul').css('display','none') $('.'+e.currentTarget.dataset.id).show() }) </script> </div> <div class="wzrFour"> <div class="wzrfour-title"> <div>Latest Downloads</div> <a href="http://www.php.cn/xiazai">More> </a> </div> <script> $(document).ready(function(){ var sjyx_banSwiper = new Swiper(".sjyx_banSwiperwz",{ speed:1000, autoplay:{ delay:3500, disableOnInteraction: false, }, pagination:{ el:'.sjyx_banSwiperwz .swiper-pagination', clickable :false, }, loop:true }) }) </script> <div class="wzrfourList swiper3"> <div class="wzrfourlTab swiper-wrapper"> <div class="check swiper-slide" data-id="onef">Web Effects <div></div></div> <div class="swiper-slide" data-id="twof">Website Source Code<div></div></div> <div class="swiper-slide" data-id="threef">Website Materials<div></div></div> <div class="swiper-slide" data-id="fourf">Front End Template<div></div></div> </div> <ul class="onef"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery enterprise message form contact code" href="http://www.php.cn/xiazai/js/8071">[form button] jQuery enterprise message form contact code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="HTML5 MP3 music box playback effects" href="http://www.php.cn/xiazai/js/8070">[Player special effects] HTML5 MP3 music box playback effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="HTML5 cool particle animation navigation menu special effects" href="http://www.php.cn/xiazai/js/8069">[Menu navigation] HTML5 cool particle animation navigation menu special effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery visual form drag and drop editing code" href="http://www.php.cn/xiazai/js/8068">[form button] jQuery visual form drag and drop editing code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="VUE.JS imitation Kugou music player code" href="http://www.php.cn/xiazai/js/8067">[Player special effects] VUE.JS imitation Kugou music player code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="Classic html5 pushing box game" href="http://www.php.cn/xiazai/js/8066">[html5 special effects] Classic html5 pushing box game</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery scrolling to add or reduce image effects" href="http://www.php.cn/xiazai/js/8065">[Picture special effects] jQuery scrolling to add or reduce image effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="CSS3 personal album cover hover zoom effect" href="http://www.php.cn/xiazai/js/8064">[Photo album effects] CSS3 personal album cover hover zoom effect</a> </div> </li> </ul> <ul class="twof" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8328" title="Home Decor Cleaning and Repair Service Company Website Template" target="_blank">[Front-end template] Home Decor Cleaning and Repair Service Company Website Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8327" title="Fresh color personal resume guide page template" target="_blank">[Front-end template] Fresh color personal resume guide page template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8326" title="Designer Creative Job Resume Web Template" target="_blank">[Front-end template] Designer Creative Job Resume Web Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8325" title="Modern engineering construction company website template" target="_blank">[Front-end template] Modern engineering construction company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8324" title="Responsive HTML5 template for educational service institutions" target="_blank">[Front-end template] Responsive HTML5 template for educational service institutions</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8323" title="Online e-book store mall website template" target="_blank">[Front-end template] Online e-book store mall website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8322" title="IT technology solves Internet company website template" target="_blank">[Front-end template] IT technology solves Internet company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8321" title="Purple style foreign exchange trading service website template" target="_blank">[Front-end template] Purple style foreign exchange trading service website template</a> </div> </li> </ul> <ul class="threef" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3078" target="_blank" title="Cute summer elements vector material (EPS PNG)">[PNG material] Cute summer elements vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3077" target="_blank" title="Four red 2023 graduation badges vector material (AI EPS PNG)">[PNG material] Four red 2023 graduation badges vector material (AI EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3076" target="_blank" title="Singing bird and cart filled with flowers design spring banner vector material (AI EPS)">[banner picture] Singing bird and cart filled with flowers design spring banner vector material (AI EPS)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3075" target="_blank" title="Golden graduation cap vector material (EPS PNG)">[PNG material] Golden graduation cap vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3074" target="_blank" title="Black and white style mountain icon vector material (EPS PNG)">[PNG material] Black and white style mountain icon vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3073" target="_blank" title="Superhero silhouette vector material (EPS PNG) with different color cloaks and different poses">[PNG material] Superhero silhouette vector material (EPS PNG) with different color cloaks and different poses</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3072" target="_blank" title="Flat style Arbor Day banner vector material (AI+EPS)">[banner picture] Flat style Arbor Day banner vector material (AI+EPS)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3071" target="_blank" title="Nine comic-style exploding chat bubbles vector material (EPS+PNG)">[PNG material] Nine comic-style exploding chat bubbles vector material (EPS+PNG)</a> </div> </li> </ul> <ul class="fourf" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8328" target="_blank" title="Home Decor Cleaning and Repair Service Company Website Template">[Front-end template] Home Decor Cleaning and Repair Service Company Website Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8327" target="_blank" title="Fresh color personal resume guide page template">[Front-end template] Fresh color personal resume guide page template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8326" target="_blank" title="Designer Creative Job Resume Web Template">[Front-end template] Designer Creative Job Resume Web Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8325" target="_blank" title="Modern engineering construction company website template">[Front-end template] Modern engineering construction company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8324" target="_blank" title="Responsive HTML5 template for educational service institutions">[Front-end template] Responsive HTML5 template for educational service institutions</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8323" target="_blank" title="Online e-book store mall website template">[Front-end template] Online e-book store mall website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8322" target="_blank" title="IT technology solves Internet company website template">[Front-end template] IT technology solves Internet company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8321" target="_blank" title="Purple style foreign exchange trading service website template">[Front-end template] Purple style foreign exchange trading service website template</a> </div> </li> </ul> </div> <script> var mySwiper = new Swiper('.swiper3', { autoplay: false,//可选选项,自动滑动 slidesPerView : 'auto', }) $('.wzrfourlTab>div').click(function(e){ $('.wzrfourlTab>div').removeClass('check') $(this).addClass('check') $('.wzrfourList>ul').css('display','none') $('.'+e.currentTarget.dataset.id).show() }) </script> </div> </div> </div> <div class="phpFoot"> <div class="phpFootIn"> <div class="phpFootCont"> <div class="phpFootLeft"> <dl> <dt> <a href="http://www.php.cn/about/us.html" rel="nofollow" target="_blank" title="About us" class="cBlack">About us</a> <a href="http://www.php.cn/about/disclaimer.html" rel="nofollow" target="_blank" title="Disclaimer" class="cBlack">Disclaimer</a> <a href="http://www.php.cn/update/article_0_1.html" target="_blank" title="Sitemap" class="cBlack">Sitemap</a> <div class="clear"></div> </dt> <dd class="cont1">php.cn:Public welfare online PHP training,Help PHP learners grow quickly!</dd> </dl> </div> </div> </div> </div> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1728490963"></script> <script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all'/> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> </body> </html>