반응형


console.log()는 로그찍을때

alert()은 경고창 띄울때

document.write는 문서 자체에 그냥 써버릴때

innerHTML은 원하는 태그 요소 안에 쓰려고할때.

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = 5 + 6;
</script>
반응형

+ Recent posts