1
Hello,
I would like to create a code that multiplies the Client’s input into the Input text field.
This multiplication would be...
Valor de taxa = 0.8;
Valor do Cliente = "O valor inserido"
Valor do Cliente * Valor de taxa.
I would like it to appear in text... As I do?
JAVASCRIPT
function calculate() {
var coins = document.getElementById('number').value;
var rate = 0.8;
var total = coins * rate;
}
What do you already know about JS? Do you know how to fetch the values of an HTML field? Or will you not have the HTML interface in this problem? Where exactly you’re struggling?
– Woss
difficulty in creating the javascript script so that it appears in text when the client inserts a numbero. It could help?
– user21312321
And how this user number will be read?
– Woss
The user number will be read by INPUT TYPE = TEXT
– user21312321
So asking again, you already know how to fetch the value of a
input
HTML with JS? If so, show that you have already developed something and add the code to the question. In fact, seek to make a [mcve] showing what you want to do.– Woss
i have already made the javascript function but I want it to automatically look in text soon when the client put 1 number... it will calculate simply, I will go by code above.
– user21312321