首页  >  文章  >  后端开发  >  请教我使用加网jsapi接口,在微网站里无法执行$.ajax

请教我使用加网jsapi接口,在微网站里无法执行$.ajax

WBOY
WBOY原创
2016-06-23 13:58:311027浏览

我使用加网js的api接口 中的自定义函数 无法执行$.ajax   sucess 或 error 都不输出

<script>function ccd(evt){        var url3 = "http://xxxxx/index.php?g=Wap&m=Card&a=ajax_fenxiang3";        // var url2 = "{lanrain::U('Card/ajax_fenxiang',array('token'=>$_GET['token'],'wecha_id'=>$_GET['wecha_id']))}";                 $.ajax({				          type: "GET",						  url: url3,						  contentType: "application/json; charset=utf-8",						  dataType: "json",						  success: function (result) {						     alert(111);                          },						  error: function (msg) {								alert(333);					      }				 })				}	var jiathis_config = {    boldNum:0,    siteNum:7,    showClose:false,    sm:"t163,kaixin001,renren,douban,tsina,tqq,tsohu",    imageUrl:"http://v2.jiathis.com/code/images/r5.gif",    imageWidth:26,    marginTop:150,    url:"http://www.jiathis.com",    title:"自定义TITLE #微博话题#",    summary:"分享的文本摘要",    pic:"自定义分享的图片连接地址",    data_track_clickback:true,    evt: {"share":"ccd"}}</script>

<!-- JiaThis Button BEGIN --><div class="jiathis_style">	<a class="jiathis_button_qzone"></a>	<a class="jiathis_button_tsina"></a>	<a class="jiathis_button_tqq"></a>	<a class="jiathis_button_weixin"></a>	<a class="jiathis_button_renren"></a>	<a class="jiathis_button_xiaoyou"></a>	<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>	<a class="jiathis_counter_style"></a><script type="text/javascript" src="http://v3.jiathis.com/code/jia.js" charset="utf-8"></script></div>


回复讨论(解决方案)

去掉
contentType: "application/json; charset=utf-8",

谢谢斑竹的热心帮忙

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn