onchange事件为html下拉列表 [英] Onchange event for html drop-down list

查看:474
本文介绍了onchange事件为html下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试控制一组下拉菜单,通过更改第一个菜单,然后所有其他菜单将选择第一个菜单选择的项目。

i am trying to control a set of drop-down menus,by changing the first menu then all the others will have the first menu selected item as selected.

在我的示例中,我想要实现的是:当更改选择全部的选定值时,其余的应该设置为该值。

In my example,what i want to achieve is : when changing the selected value of the 'select for All' then the rest should be set to that value.

我希望我明确表示。

提前感谢

检查下面的截图:

推荐答案

UPDATED !!!! 尝试此链接 DEMO

UPDATED!!!! Try this link DEMO

 $("#sortedby").change(function () {
      $("select").val($(this).val());
  });

UPDATED !!!!

这篇关于onchange事件为html下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆