JS简单计算,不知道哪里出了问题

如图

img

<html>
    <head><title>计算</title>
    <script>
        function calculate(){
var text=0;
var i=1;
do{
    text+=i;
    i++;
}while(i<101);
document.getElementById("a").innerHTML=text;    
} 
    </script>
</head>
<body>
    <form action="">
        <h1>计算1~100之和</h1>
        <input type="text" id="a"><br>
        <input type="button" value="计算" onclick="calculate()">
    </form>
</body>
</html>

innerHTML 换成 value