0

With the iFrame embedded in, my HTML looks like this:

<form>
    <input type="text" />
    <iframe ...>
        <html>
            // html content inside iframe:
            <head>...</head>
            <body>
                <input class="in-iframe" type="text" />
            <body>
        </html>
    </iframe>
</form>

With jQuery, doing this:

$("form").trigger("reset")

only resets the input outside of the iFrame, not one on the inside.

How do I reset the input inside the iFrame?

Mingle Li
  • 1,322
  • 1
  • 15
  • 39
  • 2
    You would need to include that code snippet within the iframe. Think of it as a completely separate page within your outer page. – mhatch Aug 28 '17 at 20:02
  • 1
    https://stackoverflow.com/questions/364952/jquery-javascript-accessing-contents-of-an-iframe – Chris Aug 28 '17 at 20:11

0 Answers0