개발/javascript
-
WISIWYG EDITOR – SUMMERNOTE개발/javascript 2018. 7. 24. 09:13
WYSIWYG(위지윅) 에디터란?위지윅 에디터란 “What you see is what you get”의 약자로 사용자가 보는대로 결과를 얻는다는 뜻을 줄인 말입니다. 즉, 문서 편집 과정에서 화면에 나타나는 모양 그대로 출력물이 나오는 에디터를 말합니다. 최근 대부분의 게시판에서 글을 작성하는 화면에는 이러한 위지윅 에디터가 적용되어 있습니다.HTML 기반의 위지윅 에디터는 종류가 상당히 많이 있습니다. 오랫동안 개발되어온 CKEditor나 Naver에서 배포하던 SmartEditor 등이 있습니다. 아래와 같이 코드를 작성하면 대략적으로 사용 가능합니다. Hello Summernote 버튼
-
jquery drag&drop개발/javascript 2018. 7. 23. 15:14
HTML MarkupThe HTML Markup consists of two HTML DIV controls dvSource and dvDest. To the dvSource DIV I have added some images which eventually will be dragged and dropped to the dvDest DIV. Drop here CSS StylesThe following CSS classes have to be added to the page.body{ font-family: Arial; font-size: 10pt;}img{ height: 100px; width: 100px; margin: 2px;}.draggable{ filter: alpha(opacity=60); opa..
-
비밀번호 복잡도(자바스크립트)개발/javascript 2017. 10. 23. 17:29
/* 비밀번호 확인 * 사용법 : */ function fnCheckPassword(uid, upw){ if(!/^[a-zA-Z0-9]{8,20}$/.test(upw)){ alert!('비밀번호는 숫자와 영문자 조합으로 8~12자리를 사용해야 합니다.'); return false; } var chk_num = upw.search(/[0-9]/g); var chk_eng = upw.search(/[a-z]/ig);if(chk_num < 0 || chk_eng < 0){ alert!('비밀번호는 숫자와 영문자를 혼용하여야 합니다.'); return false; } if(/(\w)\1\1\1/.test(upw)){ alert!('비밀번호에 같은 문자를 4번 이상 사용하실 수 없습니다.'); return fal..
-
자바스크립트 replaceAll 기능개발/javascript 2017. 10. 23. 17:28
String.prototype.replaceAll = replaceAll; function replaceAll(strValue1, strValue2) { var strTemp = this;while(1) { if (strTemp.indexOf(strValue1) != -1) strTemp = strTemp.replace(strValue1, strValue2); else break; }return strTemp; }String.prototype.replaceAll = replaceAll; function replaceAll(strValue1, strValue2) { var strTemp = this;strTemp = strTemp.replace(new RegExp(strValue1, "g"), strVal..