'php'에 해당되는 글 1건

  1. 2017.01.26 jQuery ajax GET 방식 php
서버사이드2017. 1. 26. 01:40


[index.php] 파일

<script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script> <!-- <script src="https://code.jquery.com/jquery-1.10.2.js"></script> -->



<script type="text/javascript"> $(function(){ $("#tstButton").click(function(){ $.ajax({ type: 'GET', url: 'part/nav_test.php?test=[-U U-]', dataType : 'text', error : function() { alert('Fail!!'); }, success: function(data) { $('#tstResult').html(data); } }); }) }) </script>


[Click me]버튼을 누르면 전체 화면을 불러오지 않고 대괄호 내부 값을 보여준다.

<input type="button" id="tstButton" value="Click me" /><br> <H3 id="tstResult">[*******]</H3>





[nav_test.php] 파일

<?php echo $_GET["test"]."<br>"; ?>





'서버사이드' 카테고리의 다른 글

appbrd_T170209Th1136zp.cpy-pwed  (0) 2017.02.09
styles.css 갱신 강제로  (0) 2017.01.15
Welcome{ *Login, *Register, fb}  (0) 2016.10.15
오리엔트db 설치 server\jvm.dll 에러  (0) 2015.09.23
lower_case_table_names  (0) 2014.12.06
Posted by 코드버무려