본문 바로가기
728x90
반응형

전체 글303

Web APIs - Console API Console API는 디버깅을 실행할 수 있는 기능들을 제공한다. 다양한 브라우저에서 구현하고 있으며, 일관된 동작을 위해 Console API spec이 지정되었다 https://console.spec.whatwg.org/ 사용법 console object는 window object의 property로, window.console 또는 console로 접근이 가능하다. console.assert(expression, message) : expression이 false일때 message를 write한다. console.assert(document.getElementById("demo"), "You have no element with ID 'demo'"); console.clear() : console.. 2022. 12. 5.
C#] Windows 서비스에 설치 관리자 추가 출처 : https://learn.microsoft.com/ko-kr/dotnet/framework/windows-services/walkthrough-creating-a-windows-service-application-in-the-component-designer installutil.exe를 이용해서 윈도우 서비스 설치하니 아래와 같은 오류가 발생했다. 어셈블리 'd:\api\bin\TestService.exe'을(를) 설치하고 있습니다. 영향을 받는 매개 변수: logtoconsole = assemblypath = d:\api\bin\TestService.exe logfile = d:\api\bin\BizNumService.InstallLog d:\api\bin\TestService.exe 어셈블.. 2022. 11. 24.
JavaScript] Event Bubbling and capturing 출처 : https://javascript.info/bubbling-and-capturing If you click on EM, the handler on DIV runs. handler는 에 할당 되었지만, 내부의 또는 어느 것을 클릭해도 동일하게 실행된다. Bubbling bubbling 원칙은 단순하다. 한 element에 event 발생 시, 맨처음 element에 있는 handler가 실행되고 그 다음 부모 그 다음 부모로 실행된다. FORM > DIV > P로 중첩된 elements가 있고, 각자 handler가 있다. FORM DIV P p를 클리갛면 p -> div -> form 순으로 alert을 볼 수 있다. 대부분의 event는 bubble이다. 예외로 focus event는 bubb.. 2022. 11. 23.
JavaScript] DOM events, Event handler, addEventListener 출처 : https://javascript.info/introduction-browser-events '이벤트'란 무언가 발생했다는 신호이다. Mouse events click contextmenu mouseover/mouseout mousedown/mouseup mousemove Keyboard events keydown/keyup Form element events submit focus Document events DOMContentLoaded - DOM전체 생성 시 CSS events transitioned - CSS-animation 종료 시 Event handlers event에 반응하기 위해, handler(event발생 시, 실행하는 함수)를 할당한다. handler할당에 여러 방법이 있다.. 2022. 11. 22.
JavaScript] Coordinates (element 좌표) 출처 : https://javascript.info/coordinates elements를 이동시키기 위해서, 우리는 좌표에 익숙해져야 한다. 대부분의 JavaScript 함수들은 두 좌표 시스템 중 하나를 사용한다. Relative to the window - position:fixed와 유사하다. window top/left edge로부터 계산한다. 이러한 좌표를 clientX/clientY로 나타낸다. Relative to the document - position:absolute와 유사하다. document top/left edge로부터 계산한다. 이러한 좌표를 pageX/pageY로 나타낸다. page를 맨처음으로 스크롤할때 window의 top/left corner는 document의 top/.. 2022. 11. 17.
JavaScript] Window sizes and scrolling 출처 : https://javascript.info/size-and-scroll-window browser window의 width, height를 어떻게 구할 수 있을까? document의 full width, height를 어떻게 구할 수 있을까? JavaScript로 page를 어떻게 scroll할 수 있을까? Width/height of the window window 가로세로를 알기 위해서, document.documentElement.clientWidth/clientHeight를 사용할 수 있다. window.innerWidth/innerHeight는 scrollbar를 포함한다. alert( window.innerWidth ); // window 가로 전체 alert( document.doc.. 2022. 11. 14.
728x90
반응형