Ajax 跨域访问 求助
我下面的这段JS代码在本地运行是正常   的,但是一当传到服务器上面以以后,运行就要出错, 
 我估计是ajax   不能跨域访问吧,所以我想请问下大家,向我这种情况,有办法吗。 
 我的需求是   填写一个网址,通过ajax   请求,然后在文本域显示该网页上HTML代码。              
  <script>                                    
 function   Ajaxpost(url,myfun)   {             
             var   ajax   =   window.ActiveXObject   ?   new   window.ActiveXObject( 'Microsoft.XMLHTTP ')   :   new   window.XMLHttpRequest();             
             ajax.open( "POST ",   url,   true);             
             ajax.setRequestHeader( "Content-Type ",    "application/x-www-form-urlencoded ");             
             ajax.onreadystatechange   =   function   ()   {             
                         if   (ajax.readyState   ==   4   &&   ajax.status   ==   200){myfun.call(ajax);ajax=null}             
             };             
             ajax.send( ' ');             
 }                                              
 function   go(){             
             var   url=document.getElementById( "url ").value             
             Ajaxpost(url,myfun)             
 }                        
 function   myfun(){             
             var   ajax=this          
             document.getElementById( "s ").value=ajax.responseText             
 }                        
  </script>                                               
  <   input   type=button   value=go   onclick=go()>             
 url: <   input   type=text   size=50   id=url>              
  <   textarea   id=s   cols=150   rows=50>  <   /textarea>              
------解决方案--------------------在自己的server上写个servlet,通过servlet来发你的请求,ajax接受servlet的返回数据