我想你想做的就是这个。
<script type="text/javascript" src="http://pre.jquery.com/jquery-latest.js"><script><script type="text/javascript">function showGetResult( name ){ jQuery.ajax({ url: 'http://localhost/index.php', type: 'get', dataType: 'text/html', success:function(data) { alert(data); document.write(data); } });}showGetResult('test');</script>


