<button id="btn1" onclick="convert( );"> Convert </button>Use this JavaScript code in your script instead.
function init( ) { var button = document.getElementById("btn1"); button.addEventListener("click", convert); } window.addEventListener("load", init);
<!-- Stan Smith HTML comment Project 1a Due Date: Apr 13 Submission Date: Apr 11 --> /* Stan Smith CSS comment Project 1a Due Date: Apr 13 Submission Date: Apr 11 // Stan Smith JavaScript comment // Project 1a // Due Date: Apr 13 // Submission Date: Apr 11