How to create N number of Input boxes using HTML based on user Input?

Solution
       function func(){
            var num = document.getElementById("num").value
            for(i=0 ; i