일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 |
- linux
- laravel
- Spring Boot
- springboot
- Web Server
- jsp
- AWS
- JPA
- db
- java
- it
- Oracle
- redis
- MySQL
- IntelliJ
- devops
- ubuntu
- jenkins
- elasticsearch
- 요리
- Gradle
- Spring
- tool
- javascript
- ReactJS
- php
- Git
- docker
- 맛집
- Design Patterns
- Today
- Total
목록2020/04/06 (4)
아무거나
값 입력 후 포커싱 자동 이동 예제(ex:핀 번호) 하기 HTML의 input 태그 설정을 사용하게되면 모바일에서 숫자만 입력 가능한 키패드가 표시된다. // react + typescript ... class PinLogin extends React.Component { ... pinCodeNumFocus2: React.RefObject pinCodeNumFocus3: React.RefObject pinCodeNumFocus4: React.RefObject pinCodeNumFocus5: React.RefObject pinCodeNumFocus6: React.RefObject constructor(props) { super(props) this.state = {} this.pinCodeNumFocus2..
const pinCode = '211112' if (/(\w)\1\1\1/.test(pinCode)) { console.log('4자리 이상 연속된 중복 문자 있음') } else { console.log('4자리 이상 연속된 중복 문자 없음') } // 결과: '4자리 이상 연속된 중복 문자 있음'
// html // css ( 숫자입력시 type=password 처럼 변형 시키는 css ) input[type=numeric] { -webkit-text-security:disc; }
React Hook을 이용한 Functional Component 구현 // tsx import * as React from 'react' ... interface IProps { history?: History, } interface IStateProps {} interface IState { testVal: string, } type Props = IProps & IStateProps const Home: React.FC = ({ history }) => { const [state, setState] = React.useState({ testVal: 'TEST', }) const { testVal } = state // componentDidMount React.useEffect(() => {} //..