久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='8FMh4'></tfoot>
    <legend id='8FMh4'><style id='8FMh4'><dir id='8FMh4'><q id='8FMh4'></q></dir></style></legend>

      1. <small id='8FMh4'></small><noframes id='8FMh4'>

        <i id='8FMh4'><tr id='8FMh4'><dt id='8FMh4'><q id='8FMh4'><span id='8FMh4'><b id='8FMh4'><form id='8FMh4'><ins id='8FMh4'></ins><ul id='8FMh4'></ul><sub id='8FMh4'></sub></form><legend id='8FMh4'></legend><bdo id='8FMh4'><pre id='8FMh4'><center id='8FMh4'></center></pre></bdo></b><th id='8FMh4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8FMh4'><tfoot id='8FMh4'></tfoot><dl id='8FMh4'><fieldset id='8FMh4'></fieldset></dl></div>
          <bdo id='8FMh4'></bdo><ul id='8FMh4'></ul>
      2. 如何從struts 2 中的java 腳本重定向到struts 動作?

        how to redirect to struts action from java script in struts 2?(如何從struts 2 中的java 腳本重定向到struts 動作?)
        <i id='oZFyz'><tr id='oZFyz'><dt id='oZFyz'><q id='oZFyz'><span id='oZFyz'><b id='oZFyz'><form id='oZFyz'><ins id='oZFyz'></ins><ul id='oZFyz'></ul><sub id='oZFyz'></sub></form><legend id='oZFyz'></legend><bdo id='oZFyz'><pre id='oZFyz'><center id='oZFyz'></center></pre></bdo></b><th id='oZFyz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='oZFyz'><tfoot id='oZFyz'></tfoot><dl id='oZFyz'><fieldset id='oZFyz'></fieldset></dl></div>

          <tfoot id='oZFyz'></tfoot>
          • <bdo id='oZFyz'></bdo><ul id='oZFyz'></ul>

                <tbody id='oZFyz'></tbody>

                <small id='oZFyz'></small><noframes id='oZFyz'>

                • <legend id='oZFyz'><style id='oZFyz'><dir id='oZFyz'><q id='oZFyz'></q></dir></style></legend>
                • 本文介紹了如何從struts 2 中的java 腳本重定向到struts 動作?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  如何從 java 腳本重定向到 struts 動作?

                  how to redirect to struts action from java script?

                  如果腳本中的條件成功,那么我需要在配置 xml 中調用一個操作,否則調用控件的任何操作都不需要停留在同一頁面上?請幫忙?

                  if condition in the script got success then i need to invoke one action in the config xml, otherwise no action invoking the control needs to stay at same page? please help on this?

                  Java 腳本

                      function displayDate()
                  {
                  
                         var x=document.getElementsByName("userName")
                      if(x = "shan")
                      {   
                      alert("shankarasd");
                      document.myForm.action ="/setUpForInsertOrUpdate";
                      document.myForm.submit();
                      }
                  
                  }
                  

                  HTML

                      <html>
                          <body>
                          <s:form action="HelloWorld" >
                              <s:textfield name="userName" label="User Name" />
                              <s:submit onclick="displayDate()" />
                          </s:form>
                      </body>
                  </html>
                  

                  config.xml

                   <struts>
                      <package name="default" extends="struts-default">
                          <action name="HelloWorld" class="vaannila.HelloWorld.HelloWorld"> 
                              <result name="SUCCESS">/success.jsp</result>
                          </action>
                          <action name="setUpForInsertOrUpdate" method="setUpForInsertOrUpdate" class="vaannila.HelloWorld.HelloWorld">
                              <result name="SUCCESS1">/success1.jsp</result>
                          </action>
                          <action name="back" method="back" class="vaannila.HelloWorld.HelloWorld">
                              <result name="SUCCESS2">/success.jsp</result>
                          </action>
                      </package>
                  </struts> 
                  

                  推薦答案

                  試試看

                  window.location='youractionname'
                  

                  這會將您的窗口重定向到您的目的地

                  This will redirect your window into your destination

                  如果您想將您的值發送到其他頁面,請按照此方法

                  If you want to sent your values to other page, then follow this method

                  <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
                      pageEncoding="ISO-8859-1"%>
                  <%@ taglib prefix="s" uri="/struts-tags" %>
                  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
                  <html>
                  <head>
                  <script type="text/javascript">
                  
                  function displayDate()
                  {
                  
                     var x=document.getElementsByName("userName")
                  if(x =="shan")
                  {   
                  alert("Redirecting");
                  return true;
                  }
                  else{  
                  alert("Not Redirecting");
                  return false;
                  }
                  }
                  </script>
                  
                  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
                  <title>Insert title here</title>
                  </head>
                  <body>
                    <s:form action="HelloWorld"  onsubmit="displayDate();">
                          <s:textfield name="userName" label="User Name" />
                          <s:submit onclick="displayDate()" />
                      </s:form>
                  </body>
                  </html>
                  

                  我修改的是,將函數調用從按鈕更改為表單提交.并從函數中刪除不需要的東西

                  What I modified is, changed the function calling from button to form submit. And removed the unwanted things from function

                  這篇關于如何從struts 2 中的java 腳本重定向到struts 動作?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)

                  • <small id='FWeq7'></small><noframes id='FWeq7'>

                      <bdo id='FWeq7'></bdo><ul id='FWeq7'></ul>
                    • <legend id='FWeq7'><style id='FWeq7'><dir id='FWeq7'><q id='FWeq7'></q></dir></style></legend>
                      <i id='FWeq7'><tr id='FWeq7'><dt id='FWeq7'><q id='FWeq7'><span id='FWeq7'><b id='FWeq7'><form id='FWeq7'><ins id='FWeq7'></ins><ul id='FWeq7'></ul><sub id='FWeq7'></sub></form><legend id='FWeq7'></legend><bdo id='FWeq7'><pre id='FWeq7'><center id='FWeq7'></center></pre></bdo></b><th id='FWeq7'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FWeq7'><tfoot id='FWeq7'></tfoot><dl id='FWeq7'><fieldset id='FWeq7'></fieldset></dl></div>
                      <tfoot id='FWeq7'></tfoot>
                            <tbody id='FWeq7'></tbody>
                            主站蜘蛛池模板: 91av国产在线视频 | 色在线免费视频 | 欧美一级毛片免费观看 | 成人欧美一区二区三区在线观看 | 成人亚洲网 | 国产亚洲www| 成人亚洲片| 黑人久久| 精产国产伦理一二三区 | 成人欧美一区二区三区在线播放 | 免费精品久久久久久中文字幕 | 国产精品无码永久免费888 | 亚洲最色网站 | 在线视频成人 | 国产精品一区二区av | 亚洲精品国产电影 | 国产一区二区三区久久久久久久久 | 日韩欧美在线观看 | 久久久久久99 | 成人精品免费视频 | 色播av| 成人高清在线视频 | 亚洲精品久久区二区三区蜜桃臀 | 亚洲国产精品自拍 | 精产国产伦理一二三区 | 日日日干干干 | 欧美二区三区 | 欧美国产视频 | 美女精品一区 | 亚洲激情一区二区三区 | 久久国产精彩视频 | 国产精品视频二区三区 | 久久久久国产 | 国产日韩欧美在线观看 | 日日做夜夜爽毛片麻豆 | 欧美精品乱码久久久久久按摩 | av午夜电影 | 欧美国产视频 | www精品美女久久久tv | 日本视频一区二区三区 | www成年人视频 |