JavaScript
-
WEB2 - JavaScript - 파일로 쪼개서 정리 정돈하기JavaScript/생활코딩 2019. 1. 3. 15:14
파일로 쪼개서 정리 정돈하기 - https://opentutorials.org/course/3085/18856 여러개의 html파일에서 공통적으로 사용하는 스크립트 영역이 있을 수 있다. 영역에서 수정이 필요할 때 모든 html에서 각 각 수정이 필요하다.이런 작업은 html이 수십개 있을 경우 관리하기 어려우며 실수를 할 확률도 높아진다. 이런 작업의 불편함을 줄이기 위해 영역을 스크립트 파일인 js파일로 만들어서html파일에서 불러오도록 설정한다.이렇게 하면 js파일만 수정하게 되면 해당 js파일을 가지고 있는 html문서들은 자동으로 그 js파일을 참조하게 된다.
-
WEB2 - JavaScript - 객체 활용JavaScript/생활코딩 2019. 1. 2. 15:25
객체 활용 - https://opentutorials.org/course/3085/18885 객체의 프로퍼티 나누기var Body = { //변수 Body안에 함수 두개를 선언 하였는데 setColor, setBackgroundColor 이 것도 프로퍼티 이기 때문에 함수가 끝나는 시점에 콤마로 프로퍼티를 나누어줘야 한다.setColor:function(color){document.querySelector('body').style.color = color;},setBackgroundColor:function(color){document.querySelector('body').style.backgroundcolor = color;}}
-
WEB2 - JavaScript - 함수의 활용JavaScript/생활코딩 2018. 12. 27. 16:00
함수의 활용 - https://opentutorials.org/course/3085/18883 WEB HTML CSS JavaScript JavaScript JavaScript (/ˈdʒɑːvəˌskrɪpt/[6]), often abbreviated as JS, is a high-level, dynamic, weakly typed, prototype-based, multi-paradigm, and interpreted programming language. Alongside HTML and CSS, JavaScript is one of the three core technologies of World Wide Web content production. It is used to make webpages i..
-
WEB2 - JavaScript - 함수예고, 함수JavaScript/생활코딩 2018. 12. 27. 15:49
함수예고 - https://opentutorials.org/course/3085/18882함수 - https://opentutorials.org/course/3085/18851 함수의 기본 문법에 관한 예제이다.Function Basic Parameter & Argument Return 매개변수(parameter)와 인자(argument) 매개변수와 인자는 아래와 같은 개념으로 생각하면 된다. 입력 : 매개변수출력 : 인자Function Basic Parameter & Argument Return 리턴 Function Basic Parameter & Argument Return [결과화면]맨 아래의 script 코드에 대한 결과화면이다.
-
WEB2 - JavaScript - 배열과 반복문의 활용JavaScript/생활코딩 2018. 12. 27. 15:01
배열과 반복문의 활용 - https://opentutorials.org/course/3085/18850 WEB HTML CSS JavaScript JavaScript JavaScript (/ˈdʒɑːvəˌskrɪpt/[6]), often abbreviated as JS, is a high-level, dynamic, weakly typed, prototype-based, multi-paradigm, and interpreted programming language. Alongside HTML and CSS, JavaScript is one of the three core technologies of World Wide Web content production. It is used to make webpa..
-
WEB2 - JavaScript - 반복문, 배열과 반복문JavaScript/생활코딩 2018. 12. 26. 14:48
반복문 - https://opentutorials.org/course/3085/18827 특정 코드를 반복해야 할 때 반복문을 사용하여 간편하게 반복시킬 수 있다. Loop[실행결과]Loop12323234 배열과 반복문 - https://opentutorials.org/course/3085/18828 배열안의 내용을 반복문으로 하나씩 꺼내서 반복해주는 예제이다. Loop & Array Co workers [결과화면]Loop & ArrayCo workersegoingleezchedurutaeho