如何使用jquery ajax将php脚本加载到div中?

$(document).ready(function(){ $("#S1").change(function() { var IDCat=this.value; $.ajax({ type: "GET", url: 'product_modify.php', data: {IDCat:IDCat}, success: function(data) { $("#p1").text(data); $("#tempForm").load('tv_form.php'); } }); }); }); 

这是我的代码,在我调用’tv_form.html’文件时它在load()函数中工作,但当我调用’tv_form.php’时它不起作用,错误是403禁止在哪里出问题? .html工作,但.php不起作用。

添加URL而不是文件名。

 $(document).ready(function(){ $("#S1").change(function() { var IDCat=this.value; $.ajax({ type: "GET", url: 'product_modify.php', data: {IDCat:IDCat}, success: function(data) { $("#p1").text(data); $("#tempForm").load('URL to tv_form.php'); // www.example.com/file.php } }); }); });