How can call any
javascript function
without saying
onclick, onchange,
onblur etc events
in php?
Answer / 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 |
How to Connect and Insert Record to MYSQL using PHP?
What is 301 redirects in php? When are we used 301 redirects in our projects?
How can call any javascript function without saying onclick, onchange, onblur etc events in php?
How can i know that how many user are visited to my page in php?
how to validation ajax in php with database actually i use here it give some time erroe so pls tell how to do right and second think is that textfeild phone number it accept only int value not charecter so tell me both and my code is that so check it then send after correction
Hi I have a dynamic dropdown reading in data from a MQSql database, I need to refresh just the dropdown (not the whole page) for any new values in the database. I am trying to use the getElementById in javascript but I have no idea how to get it to refresh. Does any one have an examples or any ideas how this can be done? Regards Srilanka_3
How can import database to mysql using php code?
What is difference between in_array and array_search?
What is difference between ksort and krsort in php?
How can manage theme in php?
How can restrict user to type upto 8 characters in textbox in php?
What is used of serialize and unserialize in php?