adspace


How can call any
javascript function
without saying
onclick, onchange,
onblur etc events
in php?

Answer Posted / Prabhat Kumar Mishra

To call a JavaScript function from PHP without using event attributes (onclick, onchange, onblur), you can use the echo statement to embed the JavaScript code within your HTML. Here's an example:nnPHP:nn<?phpn function myFunction() {n // Your JavaScript code heren }n?>nnHTML:nn<button onclick="myFunction();">Click me</button>

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

No New Questions to Answer in this Category !!    You can

Post New Questions

Answer Questions in Different Category