... <td id="val1">123</td> ... <input id="1val" /> ...
1val.value = val1.innerHTML
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>ГГ</title> </head> <body> <table> <tbody> <tr> <td id="tdval1">123</td> </tr> </tbody> </table> <input id="inpval1" type="text"> <script> var val = document.querySelector('#tdval1').innerHTML; document.querySelector('#inpval1').value = val; </script> </body> </html>