[Solved] Passing variables from HTML to JS back to HTML
Your code has lots of syntax errors. Try this: <html> <body> <table style=”width:100%”> <tr> <td class=”bosytext” width=”15%”>Membership Period</td> <td class=”bosytext” width=”75%”> <input type=”number” name=”membershipterm” id=”term” required=”required”> <button onclick=”calc()”>calc</button> $22 for single year membership/ $20 per multi-year membership </td> </tr> <tr> <td width=”15%”>Fee</td> <td width=”75%” id=”totalFee”></td> </tr> </table> <script> function calc(){ var term = document.getElementById(‘term’).value; var … Read more