으어
  • 홈
  • 방명록
  • 메뉴 닫기
  • 글작성
  • 방명록
  • 환경설정
    • 분류 전체보기 (163) N
      • HTML, CSS (6)
      • Programming (102) N
        • PHP (46) N
        • Javascript (38)
        • HTML, CSS (1)
        • SQL (12)
        • Etc. (5)
      • OS (6)
      • Etc (39)
      • Enjoy (10)
        • Animals (10)
        • Game (0)
  • 홈
  • 태그
  • 방명록
Programming/Javascript

Uncaught SyntaxError: Cannot use import statement outside a module

Firefox : Uncaught SyntaxError: import declarations may only appear at top level of a module Chrome : Uncaught SyntaxError: Cannot use import statement outside a module 파이어폭스랑 크롬에서 나오는 에러 메시지가 좀 다릅니다. 이런 식으로 type="module"을 추가하시면 됩니다. 혹은 package.json 파일이 루트 경로에 있다면 "type": "module"을 추가해 주면 됩니다. 디폴트가 common.js라서 그렇다고 하니 import, export를 사용할 게 아니라면 굳이 변경 안 하셔도 됩니다. 참고로 모듈 같은 경우 프로토콜이 http, https여야만 ..

2022. 1. 27. 14:36
Programming/Javascript

Vue.js is detected on this page.

Vue.js is detected on this page. Devtools inspection is not available because it's in production mode or explicitly disabled by the author. Vue devtools를 사용해서 브라우저에서 확인해 보려고 하면 저런 메시지가 뜹니다. 아래 링크를 가 보면 Vue.js 멤버라는 사람이 댓글을 달았네요(thumbs down이... -_-). https://github.com/vuejs/devtools/issues/190#issuecomment-415567488 Vue.js is detected on this page. Devtools inspection is not available because it'..

2022. 1. 26. 16:11
Programming/Javascript

[jQuery]이미지 첨부 시 미리 보기

$("#file").on("change", function(e) { var tmp = e.target.files[0]; var img = URL.createObjectURL(tmp); $("#image").attr("src", img); }); 대충 이런 식으로 하면 됩니다. [sample]

2021. 12. 8. 16:25
Programming/Javascript

[jQuery]datepicker에서 여러 날짜 선택할 수 있게

이 플러그인은 jQuery와 jQuery UI에 의존적이어서 두 가지를 반드시 상단에 호출을 하셔야 합니다. 그런 다음 MultiDatesPicker도 호출하시면 됩니다. 위 예시 코드에서 1 ~ 5번째 줄까지는 필수로 다 호출하시면 됩니다.그런데 위 코드 8 ~ 22번째 줄을 보면 알 수 없는 게 있습니다. 깜빡임, 다른 달(년 포함)로 넘어가서 날짜를 선택하면 오늘로 돌아오는 이상한 버그 때문에 반드시 추가하셔야 합니다. 이에 대한 내용은 아래 두 가지 링크 확인해 보시면 아마 느낄 수 있을 겁니다.깜빡임 있음깜빡임 없음

2021. 12. 2. 14:48
Programming/Javascript

url, query string 모듈

const url = require("url"); const querystring = require("querystring"); const parsed = url.parse("https://nyaongnyaong.com/40?category=833145"); console.log(parsed); console.log(querystring.parse(parsed.query)); console.log(parsed); => { protocol: 'https:', slashes: true, auth: null, host: 'nyaongnyaong.com', port: null, hostname: 'nyaongnyaong.com', hash: null, search: '?category=833145', query..

2021. 11. 19. 17:26
Programming/Javascript

Hello World!

const http = require("http"); const port = 3000; http.createServer((request, response) => { response.writeHead(200, { "Content-Type": "text/html" }); response.end("Hello World!"); }).listen(port, () => console.log(`Server running at http://localhost:${port}`));

2021. 11. 19. 17:18
  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • ···
  • 7
  • »

공지사항

전체 카테고리

  • 분류 전체보기 (163) N
    • HTML, CSS (6)
    • Programming (102) N
      • PHP (46) N
      • Javascript (38)
      • HTML, CSS (1)
      • SQL (12)
      • Etc. (5)
    • OS (6)
    • Etc (39)
    • Enjoy (10)
      • Animals (10)
      • Game (0)
애드센스 광고 영역
  • 최근 글
  • 최근 댓글

최근 글

최근댓글

태그

  • #정규표현식
MORE

전체 방문자

오늘
어제
전체

블로그 인기글

Powered by Privatenote Copyright © 으어 All rights reserved. TistoryWhaleSkin3.4

티스토리툴바