How to write a script that sticks to the formula number depending on value?

To register a script that substitutes in the formula, the number depending on the value
The script multiplies the value with the value of likes or members, where likes = 2 and members=3.
Once in the value of the digit can substitute, as it is needed for further operation of the program.
<form>
<select class="type" id="type">
 <option value="likes">Likes</option>
 <option value="members">Members</option>
</select>
<input type="number" class="amount" id="amount" placeholder="Quantity">
</form>
<div class="date"></div>

function Submit(){
 var name1=document.getElementById('type').value;
 var name2=document.getElementById('amount').value;

 }

In JS still a newbie, so asking for help from you....If not difficult, then write
June 14th 19 at 20:44
1 answer
June 14th 19 at 20:46
you also said that there is a date attribute , what's wrong?
I'm such a noob in js. I need ready code to understand. - mylene_Mann45 commented on June 14th 19 at 20:49
well, this is for you dear for freelance ...
it is arrogance not to write the line of code and ask ready - Layne_Gutkows commented on June 14th 19 at 20:52
,
function Submit(){
 var name1=document.getElementById('type').value;
 var name2=document.getElementById('amount').value;

 }
- mylene_Mann45 commented on June 14th 19 at 20:55
,
var name1 = $('#type').data('fooBar');
<option data-foo-bar="123" value="likes">Likes</option>


by analogy we can draw - Layne_Gutkows commented on June 14th 19 at 20:58

Find more questions by tags JavaScript