[Solved] How to add local variables and a different function in script element in Javascript [closed]

[ad_1] You could just get the div element you want the code to be in, and then set the innerhtml to <script>your code here</script> EDIT: Try assigning your function like so: var myFunc = function() { //Code } Then you can call myFunc(parameters) 3 [ad_2] solved How to add local variables and a different function … Read more