在Google App Engine上使用jQuery处理json表单 [英] Handling json Form with jQuery on Google App Engine

查看:103
本文介绍了在Google App Engine上使用jQuery处理json表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用GAE python 2.7编写jQuery时遇到了一些问题。 主要问题是jQuery无法捕获服务器返回的json数据。

一个简单的注释表单,没有什么特别的:

 < form action =/ postcomment /method =postid =commentform> 
< input type =textname =authorid =authoronfocus =if(this.value =='Name:(required)')this.value =''; onblur =if(this.value =='')this.value ='Name:(required)'; {%if name%} value ={{name}}{%else%} value =Name:(required){%endif%} size =22tabindex =1aria-required ='true '/>
< input type =textname =emailid =emailonfocus =if(this.value =='E-Mail:(required)')this.value =''; onblur =if(this.value =='')this.value ='电子邮件:(必填)'; {%email%} value ={{email}}{%else%} value =电子邮件:(必填){%endif%} size =22tabindex =2aria-required = 'true'/>