Remark : ajax post 전달 방법
1 2 3 |
<strong><span class="has-inline-color has-luminous-vivid-orange-color">POST 형식에 contentType: "application/html; charset=utf-8", 를 쓰면 오류가 난다. // 주석처리 </span></strong> |
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 32 33 34 |
<script type="text/javascript"> function RuleTest(id) { var Key = $("#" + id).val(); //Category var Category = $("#Category").is(":checked"); $.ajax({ type: "POST", url: "/AirFareDisplay/RuleTest", data: { AirFareDisplayRuleKey: Key, Category: Category }, //contentType: "application/html; charset=utf-8", dataType: "html", success: function (response) { $('#dialog').html(response); $('#dialog').modal('show'); //bootstrap modal }, failure: function (response) { alert(response.responseText); }, error: function (response) { alert(response.responseText); } }); } </script> |