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

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

  • 相关阅读:
    Vue v-if v-for v-bind v-on
    Vue v-bind的使用
    Vue绑定事件
    vue绑定内联样式
    Vue简单使用
    js实现UTC时间转为北京时间,时间戳转为时间
    setTimeOut函数传参数
    直播聊天室,点亮效果,jquery实现
    聊天室自动滚动效果实现
    融云rongCloud聊天室的使用
  • 原文地址:https://www.cnblogs.com/bhlsheji/p/4856271.html
Copyright © 2011-2022 走看看