print string textbox
string is not being printed <input type="text" disabled placeholder="Meeting Link" name="f"> <button type="button" id="mybtn">Generate Link</button><br> document.getElementById("mybtn").onclick = function() { var meet = [ 'https://meet.google.com/ogp-urbq-hzc', 'https://meet.google.com/ogp-urbq-hzc', 'https://meet.google.com/ogp-urbq-hzc', 'https://meet.google.com/ogp-urbq-hzc', 'https://meet.google.com/ogp-urbq-hzc' ]; var m = Math.floor(Math.random()*5); //console.log(m); //console.log(meet[m]); var meet_link = meet[m]; document.getElementsByName('f')[0].value = meet_link; } https://www.sololearn.com/compiler-playground/WWrL5Y0EeHQM