Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序中有一个表单,在某些类别中包含“价格”字段,我不希望该字段出现在用户表单中。怎么可能呢?
您可以使用隐藏的输入字段来执行此操作。
<input type="hidden" name="price" value="The value you want">
这仍然会在提交时将其值发送到数据库,但用户看不到它。