본문 바로가기

develop/java script22

api ajax script var fuelAPI = {param: {serviceAgencySeq : "",groupSeq : "",startDate : "",endDate : "",searchKeyword : "" //키워드},search : function() {modalShow("show");var html = '';var contents = '';var request = $.ajax({url: '/hnsStat/getFuelOper.json',method: "POST",data : JSON.stringify(fuelAPI.param),async : true,cache: false,dataType : "json",beforeSend : modalShow("show")}); request.done(function( res ) .. 2018. 2. 28.
웹에서 문자 보낼 때 80바이트 이상 못 쓰게 하는 자바스크립트 웹에서 문자 보낼 때 80바이트 이상 못 쓰게 하는 자바스크립트출처 : https://mytory.net/archives/11557 2017. 11. 21.
json, jsonp JSON - 동일서버 요청시var request = $.ajax({url: ROOT + '/authority/directRegistIdntfc.json',method: "POST",data: { rsrchrId : rsrchrId ,clusOrIdntfcId:clusOrIdntfcId},dataType : "json"}); request.done(function( res ) {}); request.fail(function( jqXHR, textStatus ) {});request.always(function( jqXHR, textStatus ) {}); JSONP - 다른서버 요청시 var request = $.ajax({url: ROOT + '/authority/directRegistIdntfc.jso.. 2017. 11. 15.
jquery radio 처리 1. checked 여부 확인$("input:checkbox[id='ID']").is(":checked") == true : false /* by ID */$("input:checkbox[name='NAME']").is(":checked") == true : false /* by NAME */ 2. checked/unchecked 처리$("input:checkbox[id='ID']").prop("checked", true); /* by ID */$("input:checkbox[name='NAME']").prop("checked", false); /* by NAME */ 3. 특정 라디오버튼 선택 / 모든 라디오버튼 선택해제 $("input:radio[name='NAME']:radio[value='VALU.. 2016. 12. 1.
SELECTBOX 스크립트 1. jQuery로 선택된 값 읽기 $("#selectBox option:selected").val();$("select[name=name]").val(); 2. jQuery로 선택된 내용 읽기 $("#selectBox option:selected").text(); 3. 선택된 위치 var index = $("#test option").index($("#test option:selected")); 4. Add options to the end of a select $("#selectBox").append("Apples");$("#selectBox").append("After Apples"); 5. Add options to the start of a select $("#selectBox").prepend.. 2016. 11. 30.
세션스토리지를 이용한 뒤로가기 Enumeration paramNames = request.getParameterNames();String referer = request.getHeader("referer");String method = request.getMethod();if(referer != null) { String parameter = ""; while (paramNames.hasMoreElements()) { String name = paramNames.nextElement(); if(!"".equals(parameter)) parameter += "&"; parameter += name + "=" + request.getParameter(name); }%>}else {%>}%> 2016. 7. 1.