전체 글 238

윈도우 팝업 / 레이어팝업

- 윈도우팝업 var windowPop = window.open(url, windowName, [windowFeatures]); windowPop (반환값) : 반환값이 없으면 null리턴 url (주소) : 새창이 보여질 주소, 갑싱 비어있을경우 빈창 ex) pop1.html, pop2.do windowName (팝업이름) : 팝업창의 이름, 동일한 팝업창이 열려있을 경우 해당팝업창의 내용이 초기상태로 바뀜 windowFeatures (팝업속성, 옵션) : 크기, 스크롤 등 ex) width, height, left, top, scrollbars, resizable, location(주소창 표시여부) .btn 클릭시 popup.html 윈도우 팝업 _ 크기 위치값 등 설정 $(".btn").click(..

checkbox 디자인변경

//HTML 체크 //기본체크박스없애기 .checkboxWrap input[type = "checkbox"] {display:none;} //label 속성변경 .ckeckboxWrap input[type = "checkbox"] + label{ display:inline-block; cursor:pointer; } //새로운 디자인 .checkboxWrap input[type = "checkbox"]:checked + label{ background:url(../img/img.jpg) no-repeat center; background-size:cover; } 참고) ithub.tistory.com/229 checkbox 디자인 변경하는 방법 안녕하세요. 웹 작업을 하거나 하이브리드앱을 만들때 chec..

그때 그때/CSS 2020.09.15

input 설정

input 비활성화 disabled _ form 내부에서 전송불가능 readOnly _ form 내부에서 전송가능 아이콘삽입 - 1개 //input css background: url(images/icon.png) no-repeat 7px 7px; - 2개 //input css background: url(image/icon.png), url(image/check.png) background-repeat: no-repeat; background-position: left top, right bottom; 최소, 최대 글자수 설정 - 최소글자수 - 최대글자수 박스선택시 테두리 설정 - 테두리 색상 변경 input:focus {outline:2px solid #d50000;} - 테두리 없애기 input:f..

그때 그때/HTML 2020.09.15

input 현재 날짜를 기본값으로 설정하기

현재 시간을 기본값으로 설정하기 여러개일 경우 id값 구별하기 - month 타입에 현재 월 설정하기 - date 타입에 현재 일 설정하기 - time 타입에 현재 시간 설정하기 - datetime-local 타입에 현재 날짜, 시간 세팅하기 document. getElementById() : 주어진 문자열과 일치하는 id속성을 가진 요소를 찾고 element객체에 반환 document. querySelector() : id가 없는 요소 Date : 시간의 특정 지점을 나타내는 Date객체 생성 JS Date 객체 생성(초기화) : new 연산자 사용 toISOString() : 단순화한 확장 ISO형식의 문자열 반환, 반환값은 항상 24글자 또는 27글자 slice( begin, end ) : 원본 배..

그때 그때/JS 2020.09.14

11강. Callback

'use strict'; JavaScript is synchronous. (동기적_작성순서에 따름) Execute the code block by orger after hoisting. hoisting: var, function declaration (함수 선언들이 자동적으로 가장 위로 올라감 / 코드순서대로 실행) console.log('1'); //1 //지정한 시간이 지나면 callback함수 호출 setTimeout(function(){ console.log('2'); },1000);//1초 후 browser가 출력 //간략히 setTimeout(()=> console.log('2'),1000); console.log('3'); //1,3,2 Synchronous callback function ..

10강. JSON

HTTP: hyperText Transfer Protocol _ client와 server의 소통 AJAX( Asynchronous JavaScript And XML ) - XHR( XMLHttpRequest ): 브라우저 api obj, 서버에 data요청, 수령 - fetch() API (ie X) - JSON( JavaScript Object Notation ): ECMAScript 3rd 1999 에서 영감을 받아 생성됨 - Object( key; value } - simplest data interchange format - lightweight text-based struncture - easy to read - key-value pairs - used for serialization and ..

09강. Array APIs

Q1. make a string out of an array { const fruits = ['apple', 'banana', 'orange']; const resule = fruits.join(); console.log(result); //apple.banana,orange const resule = fruits.join('^'); //구분자 추가 console.log(result); //apple^banana^orange } Q2. make an array out of a string { const fruits = '🍎, 🥝, 🍌, 🍒'; const result = fruits.split(','); //구분자 전달하기(필수) console.log(result); //["🍎","🥝","🍌","🍒"] c..

반응형