Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 중국증시
- 중국경제
- 뇌졸중
- 퀀트
- 반려견치매
- WTI
- 아모레퍼시픽
- prometheus
- 테슬라
- 머신러닝
- 금리인상
- 마법공식
- 주가분석
- 지엔티파마
- 경제위기
- 주식투자
- Python
- 미국금리
- 엘론 머스크
- WTI유
- 코로나19
- DSP
- 스크리닝
- 유상증자
- 기업분석
- 제다큐어
- FOMC
- 넬로넴다즈
- 국제유가
- 뉴지스탁
Archives
- Today
- Total
Data Analysis for Investment & Control
Ajax.Request 본문
반응형
A basic example
var url = '/proxy?url=' + encodeURIComponent('http://www.google.com/search?q=Prototype');
// notice the use of a proxy to circumvent the Same Origin Policy.
new Ajax.Request(url, {
method: 'get',
onSuccess: function(transport) {
var notice = $('notice');
if (transport.responseText.match(/href="http:\/\/prototypejs.org/))
notice.update('Yeah! You are in the Top 10!').setStyle({ background: '#dfd' });
else
notice.update('Damn! You are beyond #10...').setStyle({ background: '#fdd' });
}
});
// notice the use of a proxy to circumvent the Same Origin Policy.
new Ajax.Request(url, {
method: 'get',
onSuccess: function(transport) {
var notice = $('notice');
if (transport.responseText.match(/href="http:\/\/prototypejs.org/))
notice.update('Yeah! You are in the Top 10!').setStyle({ background: '#dfd' });
else
notice.update('Damn! You are beyond #10...').setStyle({ background: '#fdd' });
}
});
reference link : http://www.prototypejs.org/api/ajax/request
반응형
'Code > WEB' 카테고리의 다른 글
스마트한 게시판 만들기 - 네이버 <스마트 에디터>와 다음 <다음 에디터>의 오픈소스 활용 (0) | 2010.10.12 |
---|---|
DOM(Document Object Model) (0) | 2010.10.04 |
responseXML (0) | 2010.10.04 |
HTML TAG - <span> (0) | 2010.09.29 |
prototype.js (0) | 2010.09.26 |
Comments