分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
$(function(){ var _del_time_list = $("select[name='del_time_list']"); var _del_table_name = $("select[name='del_table_name']"); var _button = $("input[type='button']"); var now_date = new Date(); DelTable = function(){ this.getTimeList = function(){ year = now_date.getFullYear(); month = now_date.getMonth(); _del_time_list.html(""); _HTML = ""; for(mon = 1; mon <=parseInt(month); mon++){ if(mon<10){ mon = "0"+mon; } _HTML = _HTML + "<option>"+year+mon+"</option>"; } _del_time_list.html(_HTML); } this.delFun = function(){ var data = {}; data.table = _del_table_name.val(); data.date = _del_time_list.find("option:selected").text(); var successfn = function(jdata){ alert(jdata); } var errorfn = function(jdata){ alert("请求出错"); } $.ajax({ type: "get", /**data: data ajax请求的参数**/ data: data, url: "/DEVOPS/index.php/Monitor/delTable", dataType: "text", success: function(d){ successfn(d); }, error: function(e){ errorfn(e); } }); } } /*****http://192.168.32.161/DEVOPS/index.php/Monitor/delTable?table=history&date=201601 ****/ var DelTableObj = new DelTable(); DelTableObj.getTimeList(); _button.on('click',function(){ DelTableObj.delFun(); }) _del_table_name.on('change',function(){ DelTableObj.getTimeList(); }) })
给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
![这里写图片描述](https://i-blog.csdnimg.cn/blog_migrate/2e19ffb3303a490d20ea5d00dd397156.gif)