这个玉有什么问题?谢谢。
input#a
h1= document.getElementById('a').value
给出的错误是空白的。
As Amberlamps suggests, you have to wait until the DOM is ready.
input#a
h1
//- presuming you are using jQuery
script
$(function() {
$('h1').html($('input#a').val());
});