<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script> window.onload = function () { var show = document.getElementById('show'); show.value = 'input赋值内容'; } </script> </head> <body> <input id="show" /> </body> </html>