Call JS Function From PHP
Page 1 of 1
Call JS Function From PHP
- Code:
echo '<script type="text/javascript">'
, 'jsfunction();'
, '</script>'
;
Or escaped chars version
- Code:
<?php
// some php stuff
?>
<script type="text/javascript">
jsFunction();
</script>
- Code:
public function PHPFunction(){
echo '<script type="text/javascript">
test();
</script>';
}
<script type="text/javascript">
public function test(){
alert('In test Function');
}
</script>
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|