我正在使用motools脚本进行Web表单的客户端验证。 这是该脚本http://mootools.floor.ch/en/demos/formcheck/
的链接我的问题是,当只使用表单验证并且表单使用普通方法进行分配时很好,但是当使用表单验证并且表单使用带有motools的AJAX提交时。所以它不起作用。
那么我怎么能这样做。
由于 阿维纳什
答案 0 :(得分:0)
erm - formCheck似乎支持ajax本地提交。以下是脚本头中列出的一些选项:
submitByAjax - you can set this to true if you want to submit your form with ajax. You should use provided events to handle the ajax request (see below). By default it is false.
ajaxResponseDiv - id of element to inject ajax response into (can also use onAjaxSuccess). By default it is false.
ajaxEvalScripts - use evalScripts in the Request response. Can be true or false, by default it is false.
onAjaxRequest - Function to fire when the Request event starts.
onAjaxSuccess - Function to fire when the Request receives . Args: response [the request response] - see Mootools docs for Request.onSuccess.
onAjaxFailure - Function to fire if the Request fails.
等。