Skip to content
Advertisement

Passing HTML input value as a JavaScript Function Parameter

I am new to JavaScript, and I’m trying to figure out how to pass user-inputted values as a parameter to a JavaScript function. Here is my code:

JavaScript

Advertisement

Answer

One way is by using document.getElementByID, as below –

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement