/ Published in: PHP
Writing an PHP array in a javascript file with json_encode.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> document.getElementByID('submitButton').onclick = function() { showMovies(movies); }; </script> ... <input type="submit" value="Test JavaScript" id="submitButton">