Jak wyczyścić pole z wynikiem ?
<!Doctype html>
<html>
<body>
<input id="one"></input>
<input id="two"></input>
<div id="suma" ></div>
<button type="button" onClick="suma()" id="css1">suma</button>
<button type="button" onClick="clear()" id="css2">czyść</button>
var x = document.getElementById("one").value ;
var y = document.getElementById("two").value ;
var z =+x + +y;
function suma(){
document.getElementById("suma").innerHTML = z;
}
function clear(){
document.getElementById("suma").reset();
}
#suma{
width:20vh;
height:20vh;
border-radius:100%;
border-color:black;
border:0.4vh solid;
text-align:center;
font-size:5vh;
position:absolute;
left:15.5%;
top:25vh;
line-height: 20vh;
font-size:10vh;
}
#one{
width:20vh;
height:20vh;
border-radius:100%;
border-color:black;
border:0.4vh solid;
text-align:center;
font-size:5vh;
position:absolute;
left:10%;
top:3vh;
}
#two{
width:20vh;
height:20vh;
border-radius:100%;
border-color:black;
border:0.4vh solid;
text-align:center;
font-size:5vh;
position:absolute;
left:21%;
top:3vh;
}
.three{
width:20vh;
height:20vh;
border-radius:100%;
border-color:black;
border:0.4vh solid;
text-align:center;
font-size:5vh;
position:absolute;
left:60%;
top:30vh;
}
button#css2{
position:absolute;
top:5vh;
left:47%;
border-radius:1%;
border:black solid 0.2vh;
font-size: 3vh;
width:20vh;
height:7vh;
}
button#css1{
position:absolute;
top:5vh;
left:37%;
border-radius:1%;
border:black solid 0.2vh;
font-size:3vh;
width:20vh;
height:7vh;
line-height: 7vh;
}