1. How do I get the information from the IFRAME to the div?
2. If you use a div without an iframe, how do I make the form in the Div commit and not jump?
3. After the file is submitted to the server, how do I get his address and return to input?
upload.php:
Reply content:
1. How do I get the information from the IFRAME to the div?
2. If you use a div without an iframe, how do I make the form in the Div commit and not jump?
3. After the file is submitted to the server, how do I get his address and return to input?
upload.php:
upload.phpAfter saving the file, return the path of the file to the upper layer in the form below.
In simple terms, parent you can then access the content on the page you're on iframe .
Online Demo Address: https://xqin.net/temp/up.html
up.phpThe code is as follows (here is just the demo, so only the current time is output):
上传完成!
Before the chrome plug-in, encountered an IFRAME and external communication, do not know if there is any help
Https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
Https://github.com/xwartz/xwartz.github.com/issues/1
H5web Communication, http://www.cnblogs.com/ATree/archive/2012/03/07/html5-web-messaging.html
After a successful upload in the IFRAME, write the value into the IFRAME.
The event is hung in the window.onload and then goes to the IFRAME and takes data.
The Window object in the IFRAME can not be taken externally, get a function outside, block the default event and then call the external callback when committing in the IFRAME
Submitting a form asynchronously is okay.