You want to disable other click events for the page, using true| |false to avoid removing the binding of the event<! DOCTYPE Html>"Content-type"Content="text/html; Charset=utf-8"><title> Untitled Document </title><script type="Text/javascript"Src="Jquery-1.11.2.min.js"></script><style>Section{overflow:hidden;} Input,font,span{width:100px;height:30px;display:block;background:red;margin:010px;float: left;text-align:center;line-height:30px;font-Weight:bold;} div{width:360px;height:300px;background:# the; overflow:hidden;display:none;}</style>"Button"Value="input"/> <font>font</font> <span>span</span></section><div>div</div>< Script>$ (function () {varflag=true; $("input"). Bind ("Click", function () {flag=false; $("Div"). Show (function () {$ ( This). Click (function () {$ ( This). Hide (); Flag=true; }) }); }); $("Font"). Bind ("Click", function () {if(flag) {alert ("Font"); } }); $("span"). Bind ("Click", function () {if(flag) {alert ("span"); } }); });</script></body>JS Switch true| | False