태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

XmlHttpReques 1

PROGRAMMING 2008/05/15 11:11
사용자 삽입 이미지


http://fettig.net/weblog/2005/11/28/how-to-make-xmlhttprequest-connections-to-another-server-in-your-domain/

subdomain의 페이지의 full URL과 함께하는 XHR

  1. <html>
  2. <head>
    1. <script type=”text/javascript” src=”xmlhttp.js”></script>
    2. <script type=”text/javascript”>
      1. var AJAX_URL=”http://www.fettig.net/playground/ajax-subdomain/ajaxdata.php”;
      2. function getTime(){
        1. getUrl(AJAX_URL, gotTime);
      3. }
      4. function gotTime(status, headers, result) {
        1. document.getElementById(’time’).innerHTML = result;
        2. setTimeout(getTime, 1000)
        3. }
      5. window.onload = getTime;
    3. </script>
  3. </head>
  4. <body>
  5. <div id=”time”>
  6. </div>
  7. </body>
  8. </html>

크리에이티브 커먼즈 라이선스
Creative Commons License

'PROGRAMMING' 카테고리의 다른 글

XmlHttpReques 2  (0) 2008/05/15
XmlHttpReques 1  (0) 2008/05/15
Posted by cate shin