完整和有效的回答你的问题:
<html> <head> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script language="javascript"> function cancelClicked() { // function below will run clear.php?h=michael $.ajax({ type: "GET", url: "clear.php" , data: { h: "michael" }, success : function() { // here is the code that will run on client side after running clear.php on server // function below reloads current page location.reload(); } }); } </script> </head> <body> <a id="cancel" href="#" onclick="cancelClicked()">Cancel</a> </body> </html>