我一直在寻找有关如何在html.dropdownlist上添加HTML类标签的答案。这是代码<%: Html.DropDownList("PackageId", new SelectList(ViewData["Packages"] as IEnumerable, "PackageId", "Name", Model.PackageId))%>我想在select元素下添加选项的类,以便可以使用此链接的select:<select id="category"> <option value="1">One</option> <option value="2">Two</option></select><select id="package"> <option value="1" class="1">One - package1</option> <option value="2" class="1">One - package2</option> <option value="3" class="2">Two - package1</option> <option value="4" class="2">Two - package2</option></select>$("#series").chained("#mark");
3 回答
- 3 回答
- 0 关注
- 748 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消