아래와 같이 json형태를 만들 수도 있다. var userInfo = new Object; userInfo.id = userId; userInfo.password = userPassword; ... $ajax({ ... data : JSON.stringify(userInfo), ...
- 전체 버튼은 radio 버튼이고, 옆에 20세 ~ 100세는 textbox로 이루어 져 있다. 전체 ~ 여기서 text Box를 이용해 값을 수정하면 radio의 체크가 풀리고, 버튼의 색깔 점멸이 사라지며 다시 전체 버튼을 클릭하면 20세~100세로 text가 수정되도록 구현을 하려고한다. const radioBtn = document.getElementById('age-All-radio'); const AgeMinInput = document.getElementById('Age-min'); const AgeMaxInput = document.getElementById('Age-max'); radioBtn.addEventListener('click', function () { // 라디오 클릭 시 ..
xAxis: [ { type: 'category', axisTick: { alignWithLabel: true }, axisLine: { show: false}, // 여기 수정하면 됨 // prettier-ignore data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] } ], yAxis: [ { type: 'value', name: 'Evaporation', position: 'right', alignTicks: true, axisLine: { show: false, // 여기 수정하면 됨 lineStyle: { color: colors[0] } }, axisLabel: { formatter..
xAxis: [ { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], axisPointer: { type: 'shadow' } } ], yAxis: [ { type: 'value', name: 'Precipitation', min: 0, max: 250, interval: 50, axisLabel: { formatter: '{value} ml' }, splitLine : { show : false // 여기를 false로 주면 된다. } }, { type: 'value', name: 'Temperature', min: 0 , max: 1600, interval: 200, axisLabel: { formatter: '{va..
$(function() { var ajaxList = {}; $.ajax({ url: '/DashBoard/geDashBoardData', async: false, success:function(html) { ajaxList = html ; $('.텍스트박스1').text(ajaxList[0]."항목1"); $('.텍스트박스2').text(ajaxList[0]."항목2"); }, error: function( request, status, error ){ alert("실패 "); alert("status : " + request.status + ", message : " + request.responseText + ", error : " + error); } }, 5000); }); ajax 연결부분 끝..
1. CSS 값 가져오기 var stlye = $('.클레스명').css("스타일명"); var stlye = $('.body').css("background-color"); //style 을 출력하면 .body에 설정되어있는 background-color 가 출력된다. 2. CSS 값 변경하기 $('.클래스명').css({'스타일명' : '값'}); $('.body').css({'background-color' : 'red'}); // body 클래스의 배경색이 red로 바뀐다.