0
我想按多种属性(如流派或格式)对一组影片进行排序。这个想法是,用户用复选框元素选择他想要在屏幕上显示的电影类型。我的问题是,它怎么能插入几个属性,比如像数组一样插入几个名字来过滤它们?用于过滤元素的属性数组
<div id="filters" class="filters">
<strong>Format: </strong>
<input type="checkbox" name="format" value="Standard">Standard   
<input type="checkbox" name="format" value="3D">3D   
<input type="checkbox" name="format" value="Imax">Imax <br>
<strong>Genre: </strong>
<input type="checkbox" name="genre" value="comedy">Comedy   
<input type="checkbox" name="genre" value="drama">drama   
<input type="checkbox" name="genre" value="sciencefiction">Science fiction   
<input type="checkbox" name="genre" value="horror">Horror <br>
</div>
不能帮助你,如果我们不知道你是如何规划它的工作。你如何向我们展示一些你试图用来获得过滤效果的代码 - 即这个属性数组来过滤以及如何测试每个元素 – megawac