ajax之post get
发布时间:2020-12-16 00:33:10 所属栏目:百科 来源:网络整理
导读://表单整个提交,参数可写为$(form).serialize(),vargetTQ=function(id){$.post("?phpechourl('public/Gettq');?",{id:id},function(res){if(resres.code==200){vardata=res.data.weatherinfo;$("#tianqi_wendu").html(data.temp1);$("#tianqi_title").html(
//表单整个提交,参数可写为$(form).serialize(),vargetTQ=function(id){ $.post("<?phpechourl('public/Gettq');?>",{id:id},function(res){ if(res&&res.code==200) { vardata=res.data.weatherinfo; $("#tianqi_wendu").html(data.temp1); $("#tianqi_title").html(data.weather.substring(0,4)); $("#tianqi_icon").html("<imgalt=""+data.weather+""src="http://www.weather.com.cn/m2/i/icon_weather/29x20/"+data.img1+""/>"); } //else //jAlert(res.msg); },"json"); returnfalse; } $('#tianqi').change(function(){ getTQ($(this).val()); }); $('.moviea').click(function(){ $.get('<?phpechourl('default/video');?>',{},function(res){$('#movieshow').html(res);},'html'); }); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |