如何从隐藏输入类型数组中获取值,我的输入位于下面,我正在尝试此代码
<input type="hidden" name="POSITION[]" value="10">
var arr= $('input[type="hidden"][name="POSITION[]"]').val();
最佳答案
试试这个代码
var arr = $('input[type="hidden"][name="POSITION[]"]').map(function(){
return this.getAttribute("value");
}).get();
关于jquery - 如何使用jquery从隐藏输入类型数组中获取值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29389864/