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.
我有一个文本框,我必须在其中显示从 api 获得的数组值,问题是,我用过这样
<input name="f" type="text" id="f" value=entries.f>
并且我将值作为 ["V"] incase 的单个值和 ["V", incase 的多个值,那么我如何在文本框中显示数组值,如 V、N?
这对你有用
<input name="f" type="text" id="f" value="<%= entries.f %>">
如果您将 Rails 与 ERB 一起使用,这可能会有所帮助