`
xbyang18
  • 浏览: 16377 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
收藏列表
标题 标签 来源
点击DIV上面不消失,点击别处DIV消失 div jquery click
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type="text/javascript" src="js/jquery-1.7.1.js"></script>
        <style >
        body{
        	font-size: 15px;
        }
        	#showdiv{
        		border: solid 1px black;
        		background-color: #efee;
        		width : 50px;
        		height : 20px;
        		text-align: center;
        		cursor: pointer;
        	}
          #test{
          background: none repeat scroll 0 0 #FFFFFF;
	      border: 1px solid #CCCCCC;
	      color: #666666;
	      padding: 1px;
          }
          #test ul li {
		    margin: 0;
		    padding: 0;
		    list-style: none;
		}
		a:link, a:visited {    
		 color:#000;    
		  text-decoration:none; 
		 } 
        </style>
    </head>
    <body >
        <div id="showdiv"  >click.</div>
        <div id="test" style="display:none;width:150px;height:150px;">
            <ul>
            <li><a href="javascript:">关注我的好友</a></li>
            <li><a href="javascript:">我关注的好友</a></li>
            </ul>
    </div>
    </body>
    <script type="text/javascript">
    $(function() {
    	 $('#showdiv').click(function(e){
    	    	var $this = $(this);
    	    	$this.next().show();
    	    	e.stopPropagation();
	        $(document).click(function(e) {
	        	console.log(2);
	        	var $target = $(e.target);
	        	if($target.parents().is('#test') || $target.is('#test')){
	        	}else{
	        		$('#test').hide();
	        		$(document).unbind('click');
	        	}
	        });
    	 });
    })
    </script>
    </html>
ibatis 动态sql ibatis动态sql
<statement id="dynamicGetAccountList" resultMap="account-result">
		select * from ACCOUNT
		<dynamic prepend="WHERE">
			<isNotNull prepend="AND" property="firstName">
			
<!--				生成的语句不会有多余and,因为dynamic有一个隐含的属性,
removeFirstPrepend="true",所有一般都要写上perpend="and",需要的时候他会自动去掉-->
				(ACC_FIRST_NAME = #firstName#
				<isNotNull prepend="OR" property="lastName">
					ACC_LAST_NAME = #lastName#
				</isNotNull>
				)
			</isNotNull>
			<isNotNull prepend="AND" property="emailAddress">
				ACC_EMAIL like #emailAddress#
			</isNotNull>
			<!-- <isNotEmpty property="firstName" prepend="and" open="(" close=")" > firstName=#firstName# </isNotEmpty> -->
			<isGreaterThan prepend="AND" property="id"
				compareValue="0">
<!--				//如果参数id的值大于给定的比较值(0),那么加上下面的语句(and acc_id=#id#) ACC_ID-->
				= #id#
			</isGreaterThan>
		</dynamic>
		order by ACC_LAST_NAME
	</statement>
Global site tag (gtag.js) - Google Analytics