我想分别对tot_Price和unit_Price求和,以便我可以分析这两个属性的平均值。
<tr>\n <td>{{ $X_land->house_Type }}</td>\n <td class="address">{{ $X_land->the_Location }}</td>\n <td>{{ $X_land->tot_Price }}</td>\n <td>{{ $X_land->tran_Area }}</td>\n <td>{{ $X_land->unit_Price }}</td>\n <td><button id="opener<?php echo $opencount?>">\xe8\xa9\xb3\xe7\xb4\xb0\xe8\xb3\x87\xe8\xa8\x8a</button></td>\n</tr>\nRun Code Online (Sandbox Code Playgroud)\n\n我该怎么做?
\n谢谢。
我有一个数据集合:
q: "5,1,3,4"
Run Code Online (Sandbox Code Playgroud)
我需要获取这些值,因此我可以预先选中复选框
$('input[data-value=5]').prop('checked', true);
$('input[data-value=1]').prop('checked', true);
$('input[data-value=3]').prop('checked', true);
$('input[data-value=4]').prop('checked', true);
Run Code Online (Sandbox Code Playgroud)
我知道使用索引 q[0]可以工作,但是有什么办法不需要硬编码吗?因为我不知道这个集合中有多少个值.
谁能帮我这个??非常感谢!!