본문 바로가기

Developer/Javascript & jQuery101

[Javascript] 쌍따옴표 쓰는 방법 역슬 매니아^^ @ 1 2 3 Colored by Color Scripter cs @ 2022. 3. 23.
[jQuery] ajax로 결과를 찾아서 jQuery id로 찾아서 배치하기 ajax dataType을 html로 리턴받을 때, 리턴페이지의 부분만 찾아서 호출한 현재페이지에 배치하기 @ 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 31 /* 데이터 조회 */ function getContentsData() { $('#pageIndex').val('1'); $('html').scrollTop(0); var searchDescStatus = $('.unify .searchDesc').css('visibility'); $('.searchDesc').hide(); $.ajax({ method: 'post', url: '/sch/ajaxSearchList-data.do', data: $(.. 2022. 2. 28.
[jQuery] form2개 controller에 보내기 j 1 2 3 4 5 6 7 8 9 10 11 12 13 $.ajax({ method: 'post', url: '/sch/schTotalSearchList-data.do', data: $("#listForm, #schPopLayerForm").serialize(), // 폼2개 던지기 dataType: 'html', cache: false }) .done(function(responseHtml) { $('.txtResult').html($(responseHtml).find('#txtResultAjax').html()); //검색결과 $('.dashboard').html($(responseHtml).find('#dashboardAjax').html()); //dashboardAjax $('.agency').. 2022. 2. 22.
[jQuery] form안의 값에서 네임값찾아 넣기 $('#redListForm').find(":input[name='snsTy']").val($this.attr('data-snsTy')); 2022. 2. 8.
[jQuery] sweetalert 출처: https://wontree.tistory.com/entry/sweetalert-메시지-줄바꿈newline-안될때-체크-포인트 [느영나영 오늘도] sweetalert 메시지 줄바꿈(newline) 안될때 체크 포인트! 메시지 라이브러리중 sweetalert 을 많이 쓴다. 팝업되는 메시지를 줄바꿈을 하려고 \n 또는 태그를 입력해도 되지 않을때가 있다. 이유는 메시지 파라미터를 text 속성을 쓴 경우 였다. github 에서 가이드 하고 있는 내용을 보면, html 속성을 사용하면 html 문자열을 그대로 쓸 수 있다고 한다. ► 가이드 내용 : 그래서, html 타입으로 바꾸고 태그를 쓰니 해결 되었다.  ► 결과 화면 :  Ref. 참고자료 및 링크 . 라이브러리 링크 - https://.. 2021. 6. 28.