select 태그1 Javascript - select 태그에 항목(option) 추가 삭제하기. function add(){ var today = new Date(); // select 태그의 option을 정의한다. var op = new Option(); op.value = today; op.text = today; // select 태그에 생성 된 option을 넣는다. document.forms["frm"].sel.add(op);}function clearAll(){ // select 태그의 option을 전체 삭제한다. document.forms["frm"].sel.options.length = 0;} 2017. 2. 8. 이전 1 다음