<html>

<head>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
	</script>
	<script>
		$(document).ready(function() {
			$("#btn").click(function() {
				var table = $("#table").val();
				console.log("printing table for " + table);
				var resultString = "";

				for (i = 1; i <= 10; i++) {
					resultString = resultString + (table + "*" + i + "=" + table * i + "</br>");
				}
				$("#result").html(resultString);
			});
		});
	</script>
</head>

<body>
	Enter a number : <input type="text" name="number" id="table"><br><br>
	<button id="btn"> submit </button>
	<br>
	<p id="result"></p>
</body>

</html>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.