如何使用jquery加载外部http xml请求?

如何使用jquery加载外部http xml请求?,jquery,xml,ajax,request,Jquery,Xml,Ajax,Request,如何使用jquery加载外部http xml请求? <head> <script type="text/javascript"> $(document).ready(function(){ $.ajax({ type: "GET", url: "http://hostingz.org:2086/xml-api/createacct", dataType: "html", success: function(xml) { $(

如何使用jquery加载外部http xml请求?

    <head>
    <script type="text/javascript">
       $(document).ready(function(){

$.ajax({
    type: "GET",
url: "http://hostingz.org:2086/xml-api/createacct",
dataType: "html",
success: function(xml) {
    $("#final").append("<img src=\"icons/tick.png\" align=\"left\">Account Creation Successful!<br>The free account was created successfully!!<br><br>The account details have been sent to the email.<br><br>");
}
    });
     });

   </script>
   </head>
下面是一个url,当粘贴到像firefox这样的web浏览器时,会显示一个xml文档

这是针对CPanel XML API的

电子邮件=联系方式。wearewatching@gmail.com&domain=thewawblog&useregns=0&rel销商=0

如何在jquery中实现这一点?

    <head>
    <script type="text/javascript">
       $(document).ready(function(){

$.ajax({
    type: "GET",
url: "http://hostingz.org:2086/xml-api/createacct",
dataType: "html",
success: function(xml) {
    $("#final").append("<img src=\"icons/tick.png\" align=\"left\">Account Creation Successful!<br>The free account was created successfully!!<br><br>The account details have been sent to the email.<br><br>");
}
    });
     });

   </script>
   </head>

$(文档).ready(函数(){
$.ajax({
键入:“获取”,
url:“http://hostingz.org:2086/xml-api/createacct“,
数据类型:“html”,
成功:函数(xml){
$(“#final”).append(“帐户创建成功!
免费帐户创建成功!!

帐户详细信息已发送到电子邮件。

”; } }); });
浏览器拒绝访问外部站点以防止跨站点脚本编写。您可以使用Google API发出此类请求,也可以使用服务器端代码。

这里介绍如何使用代理。

该链接要求输入用户名和密码,并包含一个空格。