本文共 723 字,大约阅读时间需要 2 分钟。
main.py
__author__ = 'Liao'import webimport timeurls = ( '/gettime','gettime', '/(.*)', 'hello')app = web.application(urls, globals())class gettime: def GET(self): asctime=time.asctime() print asctime return asctime def POST(self): return self.GET()class hello: def GET(self, name): if not name: name = 'World' return 'Hello, ' + name + '!'if __name__ == "__main__": app.run()ajaxrawjs.html
ajaxjquery.htmlthis is a ajax rawjs page
static files must be put in static directory in webpy !
this is a ajax jquery page
static files must be put in static directory in webpy !
转载地址:http://jktai.baihongyu.com/