플그래밍/자바스킙

[JavaScript 기초] 현재 시간 조회 버튼

훗티v 2022. 12. 3. 14:54
728x90
반응형
<!DOCTYPE html>
<html>
<body>

<h1>현재 시간 조회 버튼</h1>

<button type="button" 
onclick="document.getElementById('show_current_time').innerHTML = Date()">
현재 시간은?</button>

<p id="show_current_time"></p>

</body>
</html>

 

현재 시간 조회 버튼


 






반응형