js执行服务器端事件

 <script language="javascript" type="text/javascript">
        
function check()
        {
            $.ajax({
                        type: 
"POST",
                        url: 
"xxx.aspx",
                        data: 
"aa="+aa,
                        success: 
function(msg){
                            
if(msg=="OK")
                            {
                                action();
                            }
                            
else
                            {
                                
if(confirm("请确认是否继续?"))
                                {
                                    action();
                                }
                            }
                        }
                    });
        }
        
function action()
        {
            document.getElementById(
"<%= btn.ClientID %>").click();
        }


posted @ 2010-12-02 14:40  青羽  阅读(316)  评论(0编辑  收藏  举报