In JavaScript codes, how I include a php file?

  • Thread starter Thread starter incognito person
  • Start date Start date
I

incognito person

Guest
So, I have a link and I want to included a PHP file when I click the link .
but in JavaScript I don't know how use PHP codes and functions ..
anybody can help me?
code:index.php
<script type="text/javascript">
function test(){

// include "page2.php";

}
</script>
<a href="#" onclick="test();"> test </a>
 
Back
Top