cuculus
有的时候选择下拉菜单某个值提交表单后,页面的下拉菜单就变成了默认状态,为了记住选中的某个值,要把这个值设为选中状态,方法如下:
1 $("select[name=\'group\']>option").each(function(){
2         if($(this).text() == aa){
3             $(this).attr(\'selected\', \'selected\')
4         }
5  });

 

分类:

技术点:

相关文章: