title: HTML/Javascript - Button onClick calling function with variables
body: <p>So I have an online store, I have an button which calls a function called <code>purchase()</code>, but in Javascript this function has <code>purchase(name, amount)</code>. So, you can put name easily, in the onclick function <code>onclick="purchase('milk')</code>, but my problem is  how I could put the amount? Amount is being chosen from the <code>&lt;select&gt;</code> element.</p>
  
  <p>I created somekind of JSFiddle as well, so you can take a look: <a href="https://jsfiddle.net/w2bk9hw8/" rel="nofollow">https://jsfiddle.net/w2bk9hw8/</a></p>