I have a JavaScript above this html is there any way to pass it inside EditBanner(JS Variable Here) in code below ?
//EditBanner to be changed to pass a Js variable.
<input id="EditBanner" type="button" value="Edit Image" onclick="EditBanner();"/>
I have a JavaScript above this html is there any way to pass it inside EditBanner(JS Variable Here) in code below ?
//EditBanner to be changed to pass a Js variable.
<input id="EditBanner" type="button" value="Edit Image" onclick="EditBanner();"/>
Yes, JavaScript variables will exist in the scope they are created.
If you use event handlers and jQuery it is simple also
There's an entire practice that says it's a bad idea to have inline functions/styles. Taking into account you already have an ID for your button, consider
JS
HTML