使用 javascript 执行一个 php 函数


Execut a php function with javascript

我需要制作一个带有按钮的页面,当我按下该按钮时,JavaScript函数调用运行mysql_query并在页面上打印结果的PHP函数!如何从javascript运行php函数。

你有 http://api.jquery.com/jquery.ajax/:

    $.ajax({
       url : 'script.php'
    });