lab.naminsik
  • Javascript, jQuery
  • Reactjs
  • React Native
  • iOS
  • Android
  • AWS
  • Server
  • Html, CSS
  • Php
  • asp .net
  • SQL
  • Word Press
search
keywords
  • Javascript, jQuery 2016‧12‧16

    JS - textarea의 글자들에 엔터값을 br태그로 변환

    DB 데이터를 불러와서 노출하거나 textarea로 부터 입력받은 데이터를 DB에 저장하려 할 때 종종 쓰인다. str = str.replace(/(?:\r\n|\r|\n)/g, '<br />');  str이라는 변수에 textarea에서 입력받은 데이터가 있다면 엔터는 br 태그로 변환된다. 아래는 예제 미리보기이다.

  • Javascript, jQuery 2016‧05‧03

    jQuery - input과 textarea 글자 입력수 제한

    해외에서 공유된 코드이다. 원문 : http://www.scriptiny.com/2012/09/jquery-input-textarea-limiter/ (function($) { $.fn.extend( { limiter: function(limit, elem) { $(this).on("keyup focus", function() { setCount(this, elem); }); function setCount(src, elem) { var chars = src.value.length; if (chars > limit) { src.value = src.value.substr(0, limit); chars = limit; } elem.html( limit - chars ); } setCount($(this)[0], elem); } }); })(jQuery);  이렇게 플러그인으로 […]

popular

  • 화면 안꺼지게 설정
  • react native - 프로젝트 이름, 패키지 이름 변경 (관련 파일 일괄 변경)
  • Lightsail 하나의 인스턴스에 여러 도메인 서버 구성하기
  • 컴포넌트 안에서 method 호출 or arrow 함수 호출 (feat. this 이슈)
  • lightsail ssl 인증서 (https) 무료 발급
  • http 를 https 로 리다이렉트 시키기 (.htaccess 파일로 작동)
  • 이미지에 여백이 생길 때 해결 방법들
  • 텍스트 정렬 및 스타일 정리
  • 디자이너들에게 추천하는 크롬 브라우저 앱기능
  • Photoshop - 폰트는 폴더를 따로 관리하는 것이 좋다.

comment

  • 드래그가 안 된다는 증상에서 콘솔 오류와 불러오는 파일...
  • 감사합니다!
  • 감사합니다~
  • 잘 해결 되셨다니 다행입니다!...
  • 정말 감사합니다. 덕분에 해결했습니다!...