jsp跳转后台代码页的简易方式~

it2025-08-29  8

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

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

转载于:https://www.cnblogs.com/bhlsheji/p/4856271.html

最新回复(0)