Getting value of select (dropdown) before change
来源:互联网 发布:时间同步软件apk 编辑:程序博客网 时间:2024/05/20 20:18
http://stackoverflow.com/questions/4076770/getting-value-of-select-dropdown-before-change
Combine the focus event with the change event to achieve what you want:
(function () { var previous; $("select").on('focus', function () { // Store the current value on focus and on change previous = this.value; }).change(function() { // Do something with the previous value after the change alert(previous); // Make sure the previous value is updated previous = this.value; });})();
Working example: http://jsfiddle.net/x5PKf/766
0 0
- Getting value of select (dropdown) before change
- cell editor -- get value before change
- drupal7 change value before validate and submit
- Select removing dropdown arrow
- [Semantic] dropdown(select)操作
- change select
- Before the Getting Started Guide
- getting NSDictionary value
- Change the value of "Maximum number of concurrent connections" about SQL Server 2012
- change default_host value
- dropdown
- Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your a
- jquery radiobutton select change
- select change的用法
- layui select change事件
- select change 多语言
- DropDown的value使用中文时遇到的小问题
- Distinct Values in Filter Dropdown(Distinct Sharpoint List Column Value)
- 各种编程语言查找按钮事件
- python simhash
- mysql
- jquery dynamically change svg image xlink:href
- How to get the nearest parent node given a text node in jQuery?
- Getting value of select (dropdown) before change
- 测试一下PNG图片能否引用
- 深度掌握SVG路径path的贝塞尔曲线指令
- spring中PropertyPlaceholderConfigurer和PropertyOverrideConfigurer的使用
- lubuntu opencv环境步骤 3D项目 3
- What to Do on Your Last Day at Work
- 蓝桥杯-入门训练-BEGIN-1-4题
- 中华精英会:IT应用技术的催化剂
- 蓝桥杯-基础练习-BASIC-1-5