Answer the question
In order to leave comments, you need to log in
How to add prices in JS?
There are multiple select s , choosing different ones so that the number changes. In short, you need to make a price counter for VDS specifications. To choose RAM, SSD, CPU and the price automatically changed. How to do this? I am a complete zero in JS.
Answer the question
In order to leave comments, you need to log in
If js is completely zero and you don’t want to understand, then you are on a freelance exchange, and if you want it yourself:
(example on jQuery, but you can still do it on pure js)
function sumSel() {
var sel=[],
sum=0;
sel[1]=$('.sel1').val();
sel[2]=$('.sel2').val();
sel[3]=$('.sel3').val();
for (var key in sel) sum+=parseInt(sel[key]);
return sum;
}
$(document).on('change', 'select', function() {
alert(sumSel());
})
Order on the freelance exchange. They will write in flight, for a penny.
For 200-300 rubles I think they will write. There's really nothing complicated. Everything is simple. You can see the documentation for how to do it yourself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question