Blog Content

  • replace 하기

    Category jQuery | javascript | CSS on 2017. 4. 5. 12:34

    모든 공백 제거$('#아이디').val().replace(/ /g, ''); 모든 콤마 제거$('#아이디').val().replace(/,/g, '');

    Read more
  • 78.jQuery - 나만의 jQuery 만들기 (12.PlugIn )

    Category jQuery | javascript | CSS on 2009. 11. 17. 16:32

    플러그인 제작시 유의사항 jQuery.도메인명.플러그인명.js 식으로 명명 - 도메인명 : 작성자 아이디, 회사명 등등 01.Replace.htm 새로운 함수를 만들기 //나만의 jQuery 메서드 만들기 //넘겨온 값(jQuery 개체)을 새로운 HTML로 대체 $.fn.ReplaceWith2010 = function (html) { return this.after(html).remove(); //넘겨온 HTML로 대체 후 기존 값 제거 }; $.fn.Exec = function(a, b) { var r = a + " * " + b + " = " + (a * b); //계산식 문자열 생성 return this.empty().append(r); //지정된 개체의 내용을 비우고, 문자열 추가 } $(doc..

    Read more
이전 1 다음