有什么方法来确定是否一个HTML选择当前处于打开状态? [英] Is there any way to determine if an HTML select is currently open?

查看:88
本文介绍了有什么方法来确定是否一个HTML选择当前处于打开状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网页,做一个连续的ajax刷新,我不希望这样做的刷新,如果用户当前正在进行的下拉列表中选择。有没有什么办法来检查用户是否下拉打开,然后停止更新?

I have a page that is doing a continuous ajax refresh, and I don't want to do this refresh if the user is currently making a selection in a dropdown. Is there any way to check if the user has the dropdown opened, and then stop the update?

谢谢!

推荐答案

我能想到的唯一的办法,就是用一个标志(变量),这将改变值,当用户点击SELECT(和知道,当第一次加载页面的选择是关闭)这应该可以很容易地知道,如果选择是开放与否。

The only way I can think of, is to use a flag (a variable) that will change value when the user clicks the SELECT (and knowing that when the page is first loaded, the SELECT is closed) this should make it easy to know if the SELECT is open or not.

这篇关于有什么方法来确定是否一个HTML选择当前处于打开状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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