본문 바로가기

js

(62)
js 2023. 12. 19. 17:37
[js]타임피커 라이브러리 time picker https://plugins.slyweb.ch/jquery-clock-timepicker/
js 2023. 10. 27. 09:25
[js]input:file 이미지만 업로드 되게 하기 기본적으로 이미지파일만 첨부되게끔 보이지만, 파일 업로드시 모든 파일을 선택을 하게되면 첨부는 가능함 스크립트로 유효성 검사 필요 원하는 확장자가 있을 경우 accept=".jpg,.jpeg" 로 사용 가능 (콤마로 구분) See the Pen input:file 이미지만 업로드 하기 by sangmok-ye (@sangmok-ye) on CodePen.
js 2023. 10. 25. 11:08
[js]날짜 차이 / 일수 차이 구하기 (날짜 계산) let now = new Date(); let nowYear = now.getFullYear(); let nowMon = now.getMonth()+1; let nowDate = now.getDate(); let dateNow = new Date(nowYear+"/"+nowMon+"/"+nowDate) let dateNew = new Date(2024-01-01) let dateSubt = Math.abs(dateNew.getTime() - dateNow.getTime()); dateSubt = Math.floor(dateSubt / (1000 * 60 * 60 * 24)); 밀리세컨드로 변환 후 재계산 타이머와 같이 쓸때는 24시간이 남지않았을 때 dateSubt -1 해줘야함 ** 원래 ceil이었는..
js 2023. 10. 17. 10:07
[js]해당 태그가 보일 때 푸터가 보일 때 footerTop-windowH
js 2023. 9. 13. 14:32
[js]제이쿼리로 만든 타이머 See the Pen 제이쿼리 타이머 by sangmok-ye (@sangmok-ye) on CodePen.
js 2023. 8. 7. 16:27
[js]한줄씩 나타나는 텍스트 gsap See the Pen Untitled by sangmok-ye (@sangmok-ye) on CodePen.
js 2023. 4. 18. 13:13
[js]Web Share API 웹페이지 공유하기 공유하기 const sharePage = { title:"제목", text:"내용", // 카톡에 링크와 함께 띄워짐 url:"" // url:""빈값 or window.location.href // 현재페이지 // 혹은 "https://yesm1230.tistory.com/m/108"도 가능 } document.querySelector(".btn").addEventListener("click",function(){ if(navigator.share){ // navigator를 지원 할 경우 navigator .share(sharePage) .then(()=>{ alert("성공") }) .catch((error)=>{ alert("취소") }) }else{ alert("공유하기 지원 안됨") } }) ..
js 2023. 4. 14. 16:11
[js]도메인 불러오기 주소 : https://yesm1230.tistory.com/manage/newpost/?type=post&returnURL=%2Fmanage%2Fposts%2F location.href - https://yesm1230.tistory.com/manage/newpost/?type=post&returnURL=%2Fmanage%2Fposts%2F location.protocol - https: location.host || location.hostname || location.origin - yesm1230.tistory.com location.pathname - /manage/newpost/107 location.search - ?type=post&returnURL=https%3A%2F%2Fyesm1230..

top