본문 바로가기

프로그래밍 공부/프론트엔드

(14)
EJS 사용해서 할일을 입력하면 li에 추가되는 todolist 만들기 app.js const express = require("express"); //기본 const bodyParser = require("body-parser"); //기본 - 인풋값을 js언어로 파싱해줌 const req = require("express/lib/request"); //이건 어디서 왔지? var items = ["Eat Yogurt", "Eat Probiotics", "Set a daily goal"]; // items가 add.post 안에 있으니까 그 밖에 있는 res.render에서 undefine 되어서 밖으로빼줌 // 요거트먹기, 유산균 먹기는 매일 기본적으로 할일이라서 기본값으로 지정, 밑에서 li와 연결 const app = express(); //기본 app.~ 는 다 ex..
JavaScript Date format https://stackoverflow.com/questions/3552461/how-to-format-a-javascript-date How to format a JavaScript date In JavaScript, how can I format a date object to print as 10-Aug-2010? stackoverflow.com var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; var today = new Date(); console.log(today.toLocaleDateString("en-US")); // 9/17/2016 console.log(today.toLocaleDateStr..
Bootstrap : 만들고 싶은 홈페이지 템플릿 가져오기 https://getbootstrap.com/docs/5.1/examples/ Examples Quickly get a project started with any of our examples ranging from using parts of the framework to custom components and layouts. getbootstrap.com 1. bootstrap 공식 홈에서 example 메뉴 2. 내가 만들고 싶은 페이지를 고른다. 3. 우클릭- 페이지소스보기 (또는 ctrl U) 전체 복사 4. 내 index.html에 붙여넣기 5. 주석 부분을 찾아서 boot strap cdn 복붙 6. style sheet 재설정하기: 공식홈 example에서 고른 페이지 소스보기에서 를 찾아서..
티스토리로 다시 돌아온 이유: 갤탭 다시 티스토리로 돌아온 이유: 갤탭 갤럭시탭 S7 FE 를 구매했다 주 목적: 코딩 인강 보며 삼성노트 켜놓고 메모 그 메모를 블로그에 올리기 인강 들으며 멀티창 켜놓고 메모하기는 참 좋은데 티스토리랑 호환이 잘 안되는지 자꾸 세로모드로 돌아간다 ㅠㅠ 멀티 창을 열어놓으면 가로모드에서 키보드 연결하고 입력할 수 있는데, 자칫 실수하면 세로모드로 돌아가며 입력해놓은 내용이 다 날아간다! 딥빡... 노션으로 갈아탔는데 노션을 더 심하네... 버벅 버벅 심각할 정도로. 이건 아예 불가능 한 수준이다. 영상을 보면 속터짐. 노션쓰려면 갤탭 절대절대 사지 마세요. 아이패드 또 사야해요. https://youtu.be/3HzmgG7FwcY 갤탭으로 노션 쓰면 일어나는 일 노션에 세 네페이지 정도 열심히 해보려고 했..
Web Development: JavaScript - setTimeout(function) function buttonAnimation(currentKey) { var activeButton = document.querySelector("." + currentKey); activeButton.classList.add(".pressed"); setTimeout(function() { activeButton.classList.remove("pressed"); }, 100); setTimeout (function, milliseconds, param1, param2, ...) funct function buttonAnimation(currentKey) { var activeButton = document.querySelector("." + currentKey); activeButton.classLi..
웹개발/ JavaScript: Constructor Function JavaScript 에서 Audio 넣기 var audio = new Audio("sounds/tom-1.mp3"); audio.play (); JavaScript: This property we can figure out the identity of the button that triggered the event by tapping into something called this And "this" is basically the identity of the button that triggered the event listener. console.log(this.innerHTML); console.log(this); this.style.color = "white"; JavaScript Objects. p..
생활코딩/Python 제어문 - 5.2. 반복문 - 다차원배열의 처리 이번거 어려워 @_@ persons = [ ['egoing', 'seoul', 'web'], ['basta', 'seoul', 'IOT'], ['blackdew', 'Tongyeong', 'ML'], ] name, address, interest = ['egoing', 'seoul', 'web'] print(name, address, interest) for name, address, interest in persons: print(name+address+interest) # persons 에 리스트를 작성한다. 1개가 아니고 여러개의 리스트. 리스트 내에 요소(?)들을 순서에 맞게 이름을 부여해준다. 다음에는 이 이름으로 요소들을 불러낼 수 있다. for 이름, 주소, 관심사로 지정된 persons 안..
생활코딩/ Python 조건문4 중첩조건문 조건문 4 . 중첩조건문 if boolean: if boolean: else: else: 문제: 위의 조건을 사용하여 아이디와 비번이 맞으면 welcome을, 아이디가 틀리면 wrong id를, 아이디가 맞고 비번이 틀리면 wrong pw가 뜨도록 만들기. input_id = input('id : ') input_pw = input('pw : ') id = 'egoing' pw = '1111' if input_id == id: if input_pw == pw: print('Welcome') else: print('Wrong password') else : print('Wrong ID') # input_id로 id를 input할 수 있게 하고, input_pw로 pw를 input할 수 있게 한다. id와 ..