MediaWiki:Common.js/calc.js

$(document).ready(function {   // Add HTML    $("#calc-mount").html('\ \ \ Submit \ \        \ ');   // Perform calculation when the form is submitted    $("#calc-form").submit(function(event) { event.preventDefault; var distance = Number($("#distance-input").val); var result = distance * 10 / 5 $("#calc-result").text(result); }); });