2016-09-26 11 views

答えて

1

<!DOCTYPE html> 
 
<html> 
 
<body> 
 

 
<p>Click the button to display a sequence number.</p> 
 

 
<button onclick="myFunction()">Try it</button> 
 
<input id="demo" type="text"> 
 

 

 
<script> 
 
var seq=0; 
 
function myFunction() { 
 
seq=seq+1; 
 
    document.getElementById("demo").value = seq; 
 
} 
 
</script> 
 

 
</body> 
 
</html>

関連する問題