1、jquery捕捉回车键:

[html] view plaincopy

    $("html").die().live("keydown",function(event){      
            if(event.keyCode==13){  
               //这里添加要处理的逻辑  
            }      
        });    

2.jquery获得多个选中的checkbox值:

[html] view plaincopy

    $('input[type="checkbox"][name="types"]:checked').each(function() {  
                    types = types+$(this).val()+ "|";     
                }  
            );  



3.jquery异步请求的方法:

[html] view plaincopy

    $.ajax({  
            url : "${pageContext.request.contextPath}/UOSRoleManangerAction.do?method=createRole",   
            type : "post",    
            dataType : "html",   
            data:{"roleName":roleName,"roleDescription":roleDescription,"roles":roles,"types":types},  
            success : function(data){  
                var dataObj=eval("("+data+")");  
                if(dataObj.result){  
                   alert("操作成功!");  
                   submitForm(null,"initPage");  
                }else {  
                   alert("操作失败!");  
                }  
            }   
        });