


The iframe tag implements form submission without page refresh (no js required) --- parsing
Let’s look at a piece of code first (PHP example)
1. Form code (form.php)
<?php header("Content-type: text/html; charset=utf8"); ?> <iframe name="testIframeName" style="display:none;"></iframe> <form target="testIframeName" method="post" action="formAction.php"> <input type="text" name="username"/> <input type="password" name="password"/> <input type="submit" value=" 提 交 " /> </form>
2. Action code (formAction.php):
<?php echo "<script>alert('test....');</script>"; ?>
OK, the above code is very simple, but it realizes form submission without any problem. Refresh....Why is this?
Oh~ In fact, a very basic thing... is the attribute problem of the form tag... as shown in the picture:
More iframe tags implement form form submission without page refresh (no page refresh) Requires js)---Please pay attention to the PHP Chinese website for parsing related articles!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

Zend Studio 13.0.1
Powerful PHP integrated development environment

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.
