ajax 提交數據到后臺jsp頁面及頁面跳轉問題
我logincheck.jsp頁面取傳參數代碼:
String user=request.getParameter("user1");String pwd=request.getParameter("pwd1");login.jsp input 取2參數何用ajax 傳給logincheck.jsp
$.ajax({type : "POST",url : baseUrl+"m/module/querymodulebyname.do",dataType:"json",data:{modName:title},success : function(data){//data = eval('('+data+')');var result = data.rows[0];$('#main-tab').tabs('close',title);openPage(title,'',baseUrl+result.moUrl,null);}});
注釋:type:傳輸式使用post
url: 地址數據傳輸Struts
data:傳輸參數 modName(自隨便起)action 根據modname獲取面 title
success:功返參數data
想要跳轉SUCcess面 跳轉指定頁面
感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!
新聞熱點
疑難解答