【发布时间】:2011-03-03 05:43:29
【问题描述】:
我正在使用 Cloud9 IDE。我的目标是能够开发使用 JQuery AJAX 的应用程序。
我有这两个文件:
- test.htm
<p class="result">the result</p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script>
$.get('test.php', function(data) {
$('.result').html(data);
alert('Load was performed.');
});
</script>
`2.测试.php
<?php
echo "hello world";
?>
问题是“结果”类的段落应该是“hello world”。相反,正在添加 php 文件的全部内容。
如何让 php 文件按预期回显“hello world”?
【问题讨论】:
标签: jquery ajax ide cloud9-ide