728x90 반응형 js기초1 [JavaScript] 화면출력 함수 document.write(), with(document){}, alert(), confirm(), prompt(), console.log() JavaScript 데이터 출력JavaScript를 사용하면 웹 페이지에 동적으로 내용을 추가하거나 변경할 수 있습니다. 다양한 방법으로 사용자에게 정보를 제공하는 방법을 소개합니다. document.write()with(document){}alert()confirm()prompt()console.log()👉 document.write()document.write() 메서드는 HTML 페이지가 로드될 때 직접 문서에 문자열을 쓰는 데 사용됩니다.document객체로써 document는 웹 문서를 의미한다. 웹페이지에 존재하는 HTML요소에 접근하고자 할때는 반드시 Document 객체를 사용해야한다. 📝 document.write() 형태document.write("Hello, World!"); 사.. 2024. 6. 7. 이전 1 다음 728x90 반응형