本文介绍了如何在jsFiddle中使用ajax请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建我的第一个小提琴。所以这里是我想用jquery做的
I'm trying to create my first fiddle. So here's what I want to do with jquery
$('.list').live('click', function(){ var dataPass = 'uid='+ uid; $.ajax({ type: "POST", url: "test.php", data: dataPass, cache: false, success: function(html){ //Do something } }); });那么如何/在哪里写 test.php 文件?
So how/where do I write the codes for test.php file? It's going to return some html markup.
推荐答案不可能向当前域以外的域发出AJAX请求,
It's not possible to make an AJAX request to a domain other than the current one, as it's a pretty basic security risk.
jsFiddle有一个 API 用于测试您应该使用的AJAX请求。
jsFiddle have an API for testing AJAX requests which you should use instead.
更多推荐
如何在jsFiddle中使用ajax请求
发布评论