ListBox在外部点击时变为false [英] ListBox making false on outside click

查看:87
本文介绍了ListBox在外部点击时变为false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果单击列表框外的表单上的任何位置,是否可以使列表框显示为false。请给我建议。

问候。

解决方案

如果我理解你的纠正,你想把它放在哪里,如果你失去对你的列表框的关注它消失了吗?



请尝试下面的代码。我假设您对jquery有基本的了解/可以调用jquery。



< html> 
< head>
< script src = // ajax.googleapis.com/ajax/libs/jquery/1.8。 3 / jquery.min.js>< /脚本>

< script type = text / javascript>


document )。ready( function (){

#IdOfYourListBox)。live( blur function (){


Is it possible to make a listbox visible false if I click anywhere on the form outside the listbox. Please advice me.
Regards.

解决方案

If i understand your correction correctly you want to make it where if you lose focus on your listbox that it disappears correct?

Try the code below. Im assuming you have basic understanding of jquery/can call jquery.

<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

<script type="text/javascript">


(document).ready(function(){


("#IdOfYourListBox").live("blur", function(){


这篇关于ListBox在外部点击时变为false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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