如何通过JavaScript调用PHP函数?
<?phpfunction add($a,$b){ $c=$a+$b; return $c;}function mult($a,$b){ $c=$a*$b; return $c;}function divide($a,$b){ $c=$a/$b; return $c;}?>
<script> var phpadd= add(1,2); //call the php add function var phpmult= mult(1,2); //call the php mult function var phpdivide= divide(1,2); //call the php divide function</script>
回首忆惘然
喵喔喔
相关分类