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.
是否真的有必要过滤或清理表单,select element因为输入实际上不是由用户输入的,而是用户从已经输入的选项中选择的? Note表单提交方式是POST. 谢谢回复。
select element
POST
是的。您假设用户无法更改它,而实际上他们可以。任何 DOM 检查器都允许用户简单地进入并更改选项的值,甚至添加新选项。始终,始终在服务器端验证用户输入,对于所有内容。