Dev/JavaScript17 showModalDialog 사용하기 1. window.showmodaldialog is not a function 오류 chrome에서 더이상 지원 x 호출되는 jsp에 를 import해주면 실행됨. 2. showModalDialog 데이터 전달 받기 showModalDialog는 지정한 HTML 문서를 표시하기 위한 대화창을 출력하는데 사용한다. 이때 window.showModalDialog와 window.open이 비교가 되는데 차이점은 다음과 같다. 1. showModalDialog는 자식창을 닫지 않는 이상 부모창을 선택할 수 없다. 2. showModalDialog는 자식창이 호출될때 부모창에서 자식창으로 변수값을 넘겨줄수 있다. Syntax returnVal = window.showModalDialog(uri[, argument.. 2022. 5. 20. [JavaScript] Momentum App - 5. Weather API navigator.geolocation.getCurrentPosition(success, error); - 함수 https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition Geolocation.getCurrentPosition() - Web APIs | MDN The Geolocation.getCurrentPosition() method is used to get the current position of the device. developer.mozilla.org 현재 날씨 알려주는 API https://openweathermap.org/current#geo Current weather data - OpenWeather.. 2022. 5. 3. [JavaScript] Momentum App - 4.3 ToDo-List Loading To Dos const toDoForm = document.getElementById("todo-form"); const toDoInput = document.querySelector("#todo-form input"); const toDoList = document.getElementById("todo-list"); const TODOS_KEY = "todos" const toDos = []; function saveToDos(){ //toDos array의 내용을 local Storage에 넣는다. // JSON.srtingify() : JavaScript Object나 array 또는 어떤 JavaScript 코드건 간에 // String으로 만들어 준다. localStorage.setItem(TODOS_KEY.. 2022. 5. 3. [JavaScript] Momentum App - 4.2 ToDo-List Saving to Dos const toDoForm = document.getElementById("todo-form"); const toDoInput = document.querySelector("#todo-form input"); const toDoList = document.getElementById("todo-list"); const toDos = []; function saveToDos(){ //toDos array의 내용을 local Storage에 넣는다. // JSON.srtingify() : JavaScript Object나 array 또는 어떤 JavaScript 코드건 간에 // String으로 만들어 준다. localStorage.setItem("todos", JSON.stringify(toDos)); } .. 2022. 5. 2. 이전 1 2 3 4 5 다음