Solution to the problem that input in form cannot be submitted when disabled

Solution to the problem that input in form cannot be submitted when disabled
I wrote a test program before, in which adding and modifying are written together. When I need to use modification, an input box is used in the form, and the disabled attribute is not set. Later, when I need to connect with the front-end written by others, because the id cannot be modified, the other party sets a

Copy code
The code is as follows:

Task ID: <input type="text" name="taskId" disabled="disabled">

Seeing that all the SQL statements sent were insert, I struggled for a while and found that there was something wrong with the disabled attribute. I asked Teacher Gu and found an article in Baidu Space titled "How to submit the value of a disabled form field in a form". I realized that this would cause the submission to fail. The solution is the following reply from @trocebao.

The rookie has learned some new tricks. Well, I'll record them for future reference.

<<:  Detailed steps for Linux firewall configuration (based on yum warehouse configuration)

>>:  17 JavaScript One-Liners

Recommend

MySQL encoding utf8 and utf8mb4 utf8mb4_unicode_ci and utf8mb4_general_ci

Reference: MySQL character set summary utf8mb4 ha...

A brief discussion on the magical uses of CSS pseudo-elements and pseudo-classes

CSS plays a very important role in a web page. Wi...

Various ways to achieve the hollowing effect of CSS3 mask layer

This article introduces 4 methods to achieve mask...

Detailed explanation of common methods of JavaScript arrays

Table of contents Common array methods pop() unsh...

Thoughts on truncation of multi-line text with a "show more" button

I just happened to encounter this small requireme...

mysql zip file installation tutorial

This article shares the specific method of instal...

How to write elegant JS code

Table of contents variable Use meaningful and pro...

How to install mysql5.7 in windows

First download the compressed version of mysql, t...

Markup language - specify CSS styles for text

Click here to return to the 123WORDPRESS.COM HTML ...

How to convert extra text into ellipsis in HTML

If you want to display extra text as ellipsis in ...

Super detailed MySQL usage specification sharing

Recently, there have been many database-related o...