v-model1 [Vue.js] input 값 길이 체크 [Vue.js] input 값 길이 체크 input 입력 데이터의 길이를 확인해서, 길이 초과시에 메시지를 출력한다. v-on:input 추가 vue 생성 methods 를 추가합니다. var vue_event_regist = new Vue({ el: '#title', methods: { title_typing : function(e){ this.max_length(e, 5, '제목', '#title'); }, max_length : function(e, len, title, id){ var val = e.target.value; if (val.length > len){ var msg = title + '의 최대 입력 길이는 ' + len + &#.. 2017. 4. 24. 이전 1 다음