How to use image to submit form
This time I will show you how to use image to submit form, what are the precautions to use image to submit form, the following is a practical case, let's take a look.
The code is as follows:<form method="post" action="formtest.html" target="_blank" name="formtest"> <input type="hidden" name="userid" value="userid"> <input type="hidden" name="username" value="username"> <input type="image" src="imagesubmit.gif" border="0"> </form>
That way it will be submitted twice, the input itself is submitted once, and the js script is submitted again Submit once
Use
picture as the submit button. There are several methods as follows: 1.
<form method="post" action="formtest.jsp"> <input type="hidden" name="userid" value="userid"> <input type="hidden" name="username" value="username"> <input type="image" src="imagesubmit.gif" border="0"> </form>
2.
<script> function formsubmit(){ document.formtest.action="formtest.jsp"; document.formtest.submit(); } </script> <form method="post" name="formtest"> <input type="hidden" name="userid" value="userid"> <input type="hidden" name="username" value="username"> <img src="imagesubmit.gif" border="0" onclick="formsubmit()"> </form>
ProgrammingIf the parameters you want to submit change with the dynamically retrieved content
I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website! Related reading:How to implement HTML-like command line interface
How to implement list loop with html+css+javascript Scroll
How to use button trigger to achieve background color flash
The above is the detailed content of How to use image to submit form. For more information, please follow other related articles on the PHP Chinese website!

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

MySQL transaction processing: the difference between automatic submission and manual submission. In the MySQL database, a transaction is a set of SQL statements. Either all executions are successful or all executions fail, ensuring the consistency and integrity of the data. In MySQL, transactions can be divided into automatic submission and manual submission. The difference lies in the timing of transaction submission and the scope of control over the transaction. The following will introduce the difference between automatic submission and manual submission in detail, and give specific code examples to illustrate. 1. Automatically submit in MySQL, if it is not displayed

This article will introduce seven ways to get high-quality output using the free BingImageCreator. BingImageCreator (now known as ImageCreator for Microsoft Designer) is one of the great online artificial intelligence art generators. It generates highly realistic visual effects based on user prompts. The more specific, clear, and creative your prompts are, the better the results will be. BingImageCreator has made significant progress in creating high-quality images. It now uses Dall-E3 training mode, showing a higher level of detail and realism. However, its ability to consistently produce HD results depends on several factors, including fast

How to delete images on Xiaomi mobile phones? You can delete images on Xiaomi mobile phones, but most users don’t know how to delete images. Next is the tutorial on how to delete images on Xiaomi mobile phones brought by the editor. Interested users can come and join us. Let's see! How to delete images on Xiaomi mobile phone 1. First open the [Album] function in Xiaomi mobile phone; 2. Then check the unnecessary pictures and click the [Delete] button in the lower right corner; 3. Then click [Album] at the top to enter the special area , select [Recycle Bin]; 4. Then directly click [Empty Recycle Bin] as shown in the figure below; 5. Finally, directly click [Permanent Delete] to complete.

LINUX is an open source operating system. Its flexibility and customizability make it the first choice of many developers and system administrators. In the LINUX system, image processing is a very important task, and Imagemagick and Image are Two very popular image processing tools, this article will introduce you to how to install Imagemagick and Image in Centos system, and provide detailed installation tutorials. Imagemagic installation Centos tutorial Imagemagick is a powerful image processing toolset, which can perform various image operations under the command line. The following are the steps to install Imagemagick on Centos system: 1

Tips for implementing form validation and submission with PHP and UniApp Introduction: When developing web pages or mobile applications, form validation and submission are essential functions. Form validation is used to check whether the data entered by the user conforms to specific rules, and submission saves or sends the data entered by the user to the server. This article will introduce the techniques of using PHP and UniApp to implement form validation and submission to help developers quickly implement front-end and back-end interaction functions. 1. PHP implements form validation. The following is a PHP form validation sample code for

Introduction to git Git is a distributed version control system, which means that each developer has a complete copy of the code base on their computer. This is different from a centralized version control system (such as Subversion or Perforce), which only has a central code repository. The benefit of distributed version control is that it makes collaboration more efficient because developers can work offline and synchronize with the central code base later. Installing Git To use Git, you need to install it on your computer first. You can download the installer for your operating system from the official Git website. After the installation is complete, you can enter git --version in the command line to check whether the installation was successful. Git basic concepts repository: Git

How to handle complex form submissions in Vue requires specific code examples. In Vue, to handle complex form submissions, you can use Vue's form processing methods and other related plug-ins or features to simplify the development process. This article will introduce how to use Vue and some other common plug-ins to handle complex form submissions, and provide specific code examples. 1. Two-way binding of form data One of the core features of Vue is the two-way binding of data. In form processing, we can use Vue instructions to achieve bidirectional communication between form data and views.

How to handle form data verification and submission in Vue technology development In Vue technology, processing form data verification and submission is a common and important task. In actual development, we often need to verify the form data entered by the user to ensure that it meets the specified format requirements and can be safely submitted to the back-end server. The following will introduce a common method of processing form data verification and submission, and provide specific code examples. Data verification in Vue, we can use the Vuelidate plug-in for form data
