유령노트
ajax로 서버 시간 가져오기 본문
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $(function () { $.ajax({ type: 'GET', cache: false, url: location.href, complete: function (req, textStatus) { var dateString = req.getResponseHeader('Date'); if (dateString.indexOf('GMT') === -1) { dateString += ' GMT'; } var date = new Date(dateString); $('#serverTime').text(date.toString()); } }); }); | cs |
'# Dev > Jquery' 카테고리의 다른 글
JQGrid (0) | 2017.02.03 |
---|---|
DIV 크기가 0으로 고정이 되고 바뀌지 않을 때 (0) | 2017.01.09 |
JQGrid(제이큐그리드) 리로드 시키기 (0) | 2016.12.22 |
라디오 박스 세팅 (0) | 2016.12.20 |