프로그래밍/Script

프로그래밍/Script

[javascript] Slider - swiper

https://swiperjs.com/demos Swiper Demos Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior. swiperjs.com

프로그래밍/Script

[JavaScript] 브라우저에서 뒤로가기 했을때, 자바스크립트 실행하기

[JavaScript] 브라우저에서 뒤로가기 했을때, 자바스크립트 실행하기 // javascript window.onpageshow = function(event){ if( event.persisted ){ console.log("BFCache로부터 복원됨"); }else{ console.log("새로 열린 페이지"); } } // jquery $(window).bind("pageshow", function(event){ if( event.originalEvent.persisted ){ console.log("BFCache로부터 복원됨"); }else{ console.log("새로 열린 페이지"); } });

프로그래밍/Script

스크립트 정규식을 화면으로 보여주는 사이트 - regulex

스크립트 정규식을 화면으로 보여주는 사이트 - regulex https://jex.im/regulex/ Regulex:JavaScript Regular Expression Visualizer jex.im

프로그래밍/Script

[javascript] history.pushState ( 화면 전환 )

History API (https://developer.mozilla.org/ko/docs/Web/API/History_API) DOM의 Window 객체는 history 객체를 통해 브라우저의 세션 기록에 접근할 수 있는 방법을 제공합니다. history는 사용자를 자신의 방문 기록 앞과 뒤로 보내고 기록 스택의 콘텐츠도 조작할 수 있는, 유용한 메서드와 속성을 가집니다. History.pushState 는 페이지 이동 없이 주소만 바꿔준다. (브라우저의 뒤로가가 버튼이 활성화 된다.) 브라우저 페이지를 이동하게 되면 window.onpopstate 라는 이벤트가 발생하게 되는데, pushState 를 했을때는 popstate 이벤트가 발생하지않고, 뒤 / 앞으로 가기를 클릭 했을때 popstate 이..

프로그래밍/Script

[javascript] 새로고침 없이 파라미터 제거/수정. Remove URL parameters without refreshing page

[javascript] 새로고침 없이 파라미터 제거/수정 Remove URL parameters without refreshing page window.history.pushState({}, document.title, "/" + myNewURL ); https://stackoverflow.com/questions/22753052/remove-url-parameters-without-refreshing-page Remove URL parameters without refreshing page I am trying to remove everything after the "?" in the browser url on document ready. Here is what I am trying: jQuery(do..

프로그래밍/Script

[javascript] 파라미터 제거하기. remove url parameters with javascript or jquery

[javascript] 파라미터 제거하기. remove url parameters with javascript or jquery https://stackoverflow.com/questions/4651990/remove-url-parameters-with-javascript-or-jquery remove url parameters with javascript or jquery I am trying to use the youtube data api to generate a video playlist. However, the video urls require a format of: youtube.com/watch?v=3sZOD3xKL0Y but what the api generates is: youtube...

프로그래밍/Script

[JAVASCRIPT] 25 Killer JavaScript One-Liners That’ll Make You Look Like a Pro

A list of one-liners you should know to up your knowledge of JavaScript. 1.# Copy content to the clipboard In order to improve the user experience of the website, we often need to copy the content to the clipboard, so that users can paste it to the designated place. const copyToClipboard = (content) => navigator.clipboard.writeText(content) copyToClipboard("Hello fatfish") 2.# Get the mouse sele..

프로그래밍/Script

[jQuery] 숫자에 콤마 제거, replace comma

숫자에 콤마 제거 replace comma 금액필드에 , 제거 해야할 경우 amount.replace(",", ""); -> only replace one comma -> 앞에 한개만 제거 amount.replace(/,/g, ''); -> replace all comma -> 모든 콤마 제거 -> 정규식 How to replace all of comma Result) amount = "1,000,000" amount.replace(",", ""); 1000,000 amount.replace(/,/g, ''); 1000000

홍반장水_
'프로그래밍/Script' 카테고리의 글 목록