AJAX

    [Python web] 5. Template(), ajax() html글 객체 가져오기 (Brython)

    1.Brython document 속성 표 함수 설명 예제 Template() html글 안의 {}로 묶인 객체를 변환할수 있다 Template(document['아이디']).render(name='글에{여기부분} 이름입력') ajax() web 상의 정보를 가져오고 불러올 수 있다 req = ajax.ajax() req.open('GET', url, True) req.bind('complete', 실행함수) json web의 text 정보를 분석 추출하는데 사용한다 data = json.loads(req.responseText) targettext = data['특정속성'] set_timeout() sleep을 사용할 수 없어 대신 사용한다 timer.set_timeout(실행함수, 3000) 2. 실..