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

WBOY
Release: 2016-06-23 13:58:31
Original
1034 people have browsed it

我使用加网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>
Copy after login

<!-- 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>
Copy after login


回复讨论(解决方案)

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

谢谢斑竹的热心帮忙

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template