zoukankan      html  css  js  c++  java
  • jsp跳转后台代码页的简易方式~

    jsp跳转到代码隐藏页。有几种方法,例如,:

        action方式;

       jquery方式,码如下面:

    function regCust(){
            $('#containerFRM').form(
                    'submit',
                    {
                        "url" : "${webAppUrl}/cust/registeredUser.html",
                        onSubmit : function() {
                            //显示遮罩
                            $.jBox.tip("正在提交……", 'loading');
                        },
                        success : function(responseText) {
                            $.jBox.closeTip();
                            if('success' == responseText){
                                /*$.jBox.tip("注冊成功,3秒后自己主动跳转……", 'success');
                                window.setTimeout(function () {
                                    window.location.href = document.getElementById('strBackUrl').value
                                }, 3000);*/
                                
                                $('.themsMain').html("<div style='height: 100px;margin-top: 50px;text-align: center;font-weight: bold;font-size: 16px;line-height:36px;'><img src='${webUiUrl}/images/chengg.jpg' width='64' height='59' /><span class='red bold font16'>恭喜您,注冊成功!

    </span><br />系统<span id='time_span'>3</span>秒之后自己主动跳转...<div><div>");
                                window.opener.location.reload();
                                interValObj = window.setInterval(setTime, 1000);
                            }else{
                                $.jBox.error('注冊失败', '提示');
                            }
                            
                    }
            },'text');
        }

      ajax方式。如今来说说ajax方式,代码例如以下:

    $.ajax({
                url:"${webAppUrl}/cust/existsUser.html?user_sn="+s,
                type : "post",
                dataType : "text",
                contentType : "application/text;charset=utf-8",
                cache : false,
                async : false,
                success : function(data) {
                    if('false' == data || !data)
                    {
                        regCust();
                    }else{
                        $.jBox.info('username已经存在,请又一次输入', '提示');
                    }
                }
            },'text');

    版权声明:本文博主原创文章,博客,未经同意不得转载。

  • 相关阅读:
    Gitcafe绑定自定义域名
    如何优雅地使用Sublime Text
    使用Hexo搭建专属Blog
    How to Use Android ADB Command Line Tool
    雷军北大15分钟演讲:我至少有胆量去想(转)
    浅谈android中的目录结构
    react里 MD5加密
    git忽略相应文件夹,不上传
    antd-mobile的按需加载
    当react 项目使用px2rem
  • 原文地址:https://www.cnblogs.com/bhlsheji/p/4856271.html
Copyright © 2011-2022 走看看