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');

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

  • 相关阅读:
    【C++】资源管理
    【Shell脚本】逐行处理文本文件
    【算法题】rand5()产生rand7()
    【Shell脚本】字符串处理
    Apple iOS产品硬件参数. 不及格的程序员
    与iPhone的差距! 不及格的程序员
    iPhone游戏 Mr.Karoshi"过劳死"通关. 不及格的程序员
    XCode V4 发布了, 苹果的却是个变态. 不及格的程序员
    何时readonly 字段不是 readonly 的?结果出呼你想象!!! 不及格的程序员
    object file format unrecognized, invalid, or unsuitable Command 不及格的程序员
  • 原文地址:https://www.cnblogs.com/bhlsheji/p/4856271.html
Copyright © 2011-2022 走看看