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.
我有一个使用 hidden_field_tag 的表单。我在 hidden_field_tag 中作为参数输入的值是一个整数,但是当它出现在另一边时,它是一个字符串。隐藏字段标签会自动转换吗?谢谢
简短回答 = 是 真正的答案是它在 html 端创建了一个输入标签,您作为整数传入的值被设置为 value="your value here"。所以输入字段中的任何内容都将是一个字符串。