[英]jquery.jeditable is not allowed by Access-Control-Allow-Origin
i am using jquery.jeditable and every time i submit i get This error : 我正在使用jquery.jeditable并且每次我提交时都会出现此错误:
XMLHttpRequest cannot load http://www.coacharabia.com/save.php. Origin http://coacharabia.com is not allowed by Access-Control-Allow-Origin.
Note that the file and the save.php are on the same server in the same folder . 请注意,文件和save.php位于同一文件夹中的同一服务器上。 the code am using is :
使用的代码是:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jeditable/jquery.jeditable.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('.edit').editable('http://www.coacharabia.com/save.php', {
cancel : 'Cancel',
submit : 'Save',
indicator : '<img src="jeditable/img/indicator.gif">',
tooltip : 'Click to edit...'
});
});
</script>
Just try replacing: 只需尝试更换:
$('.edit').editable('http://www.coacharabia.com/save.php', {
By: 通过:
$('.edit').editable('http://coacharabia.com/save.php', {
Or just: 要不就:
$('.edit').editable('save.php', {
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.