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.
我正在动态生成一个选择下拉菜单,并且很好奇是否有一个可行的选项来包含其他信息,也许是相关的数据库 ID 到表单的选项值中。我正在使用 Javascript/Ajax 处理所有数据流,并且想知道这是否可能以节省数据库资源。
如果没有其他方法,您可以将 db id 作为值。用户不会看到。
<option value="CA+":"id+":"+something >California -- CA </option>
数据操作取决于您 - 分解或拆分选项的值
反正..不好看。!!!