0

I have a HTML form that is targeted to an IFRAME when "submit" is pressed. This iframe then loads a page (after submit is pressed) that reports whether the data input by the user is valid or not. It simply shows on screen "TRUE" or "FALSE". I want JQuery to check this text on the loaded iframe, and refresh the page if it displays "TRUE".

The question is: How can JQuery get the content of a Iframe?

ps: The FORM sends files. So load() is not an option.

4

1 回答 1

0

use jquerys functions .get() or .load() instead of an iframe. more unobstrusive =)

do the validation before sending any data to the server or saving them on the server using jquery.validation: http://docs.jquery.com/Plugins/Validation

于 2012-05-12T08:02:51.617 回答