我有一个从 PHP 填充的 div 我正在尝试将 div 中的所有输入框绑定到变量,(我不希望使用序列化)如何使用 Jquery 选择每个输入框并将其绑定到变量,例如
var location_id = $('#Wednesday').find('input').nth-child(0);
var static_id =$('#Wednesday').find('input').nth-child(1);
那种性质的东西谢谢!
<div id='Wednesday' class='ui-widget-content ui-state-default' name='' value=''> ";
echo "<input name='".$day."_".$locationid."_locationID' value='".$locationid."' type='hidden'> ";
echo "<input name='".$day."_".$locationid."_static' value='".$static."' type='hidden'> ";
echo "<input name='".$day."_".$locationid."_primary' value='".$first_always."' type='hidden'> ";
echo "<input name='".$day."_".$locationid."_all_locations' value='".$all_locations."' type='hidden'> ";
</div>