How to use jQuery AJAX for an outside domain?

后端 未结 5 1206
闹比i
闹比i 2020-12-11 11:49

I am trying to perform a simple jQuery AJAX attempt using either a .get() or a .post().

If I have a local copy on my server and do:

$.get(\'/hash.php         


        
5条回答
  •  旧时难觅i
    2020-12-11 12:21

    You cannot do cross domain ajax requests directly, this would be a security concern.

    You will need to call your local php file from jquery and have the php file talk to the other domain.

提交回复
热议问题