JSFiddle - React, Tailwind, and code Playground
by shahrukh007
HTML
<html>
<body>
<h2>Print Table</h2>
Enter No of Col:<input type="number" id="col">
<br>
Enter No of Row:<input type="number" id="row">
<br>
<button type="button" onclick="myFunction();">click me!</button><br>
<p id="demo"></p><br>
<script>
function myFunction(){
var text ="";
var x= document.getElementById("col").value;
var y= document.getElementById("row").value;
for(var i=1; i <=x; i++)
{
for (var j=1; j<=y; j++)
{
text+=(i*j);
}
}
}
</script>
</body>
</html>