Just trying to run a simple function when the button "calculate" is pressed. Function won't run at all when inputs are in a form, ultimately I want to be able to modify the other inputs when the calculate button is pressed. Any help at all please!
function calculate() {
alert("called");
}
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</head>
<form name="form">
Price:
<input name="priceCAD" value="0">
<br>
<br>Markup:
<input name="percentage" value="0">
<br>
<br>Fiat:
<input name="fiat" value="0">
<br>
<br>BTC:
<input name="btc" value="0" maxlength="11">
<br>
<br>
<input type="button" onClick="calculate()" name="calculate" value="Caculate">
<input type="button" name="clear" value="Clear" onClick="form.fiat.value=0, form.btc.value=0, form.markup.value=0">
</form>