.... How to call a JavaScript function on submit form? Local variables can only be accessed In this tutorial, we are going to change our CSS and HTML text using JavaScript functions dynamically. All done! After that, pass an argument with the onClick event function. A basic function looks like this: This function will add any two numbers we give it together and then send back, or return the sum. If you want to make a button onclick, you need to add the onclick event attribute to the