Call function javascript from PHP
---- avarias_js.js ----
function limpar() { alert('test'); }
---- avarias.php ----
add_action('init','initjs');
function initjs() {
wp_enqueue_script( 'avarias_js', plugins_url( 'avarias_js.js',
__FILE__ ));
}
how do i call the function 'limpar()' on the javascript file with a click
of a button?
No comments:
Post a Comment