<tfoot id='rPxom'></tfoot>

    1. <legend id='rPxom'><style id='rPxom'><dir id='rPxom'><q id='rPxom'></q></dir></style></legend>
        • <bdo id='rPxom'></bdo><ul id='rPxom'></ul>

      1. <i id='rPxom'><tr id='rPxom'><dt id='rPxom'><q id='rPxom'><span id='rPxom'><b id='rPxom'><form id='rPxom'><ins id='rPxom'></ins><ul id='rPxom'></ul><sub id='rPxom'></sub></form><legend id='rPxom'></legend><bdo id='rPxom'><pre id='rPxom'><center id='rPxom'></center></pre></bdo></b><th id='rPxom'></th></span></q></dt></tr></i><div id='rPxom'><tfoot id='rPxom'></tfoot><dl id='rPxom'><fieldset id='rPxom'></fieldset></dl></div>

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

        使用 jQuery 或 JavaScript 读取属性文件

        Read properties file using jQuery or JavaScript(使用 jQuery 或 JavaScript 读取属性文件)

        <legend id='gvFSb'><style id='gvFSb'><dir id='gvFSb'><q id='gvFSb'></q></dir></style></legend>
          <bdo id='gvFSb'></bdo><ul id='gvFSb'></ul>

                    <tbody id='gvFSb'></tbody>
                  <i id='gvFSb'><tr id='gvFSb'><dt id='gvFSb'><q id='gvFSb'><span id='gvFSb'><b id='gvFSb'><form id='gvFSb'><ins id='gvFSb'></ins><ul id='gvFSb'></ul><sub id='gvFSb'></sub></form><legend id='gvFSb'></legend><bdo id='gvFSb'><pre id='gvFSb'><center id='gvFSb'></center></pre></bdo></b><th id='gvFSb'></th></span></q></dt></tr></i><div id='gvFSb'><tfoot id='gvFSb'></tfoot><dl id='gvFSb'><fieldset id='gvFSb'></fieldset></dl></div>
                1. <tfoot id='gvFSb'></tfoot>

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

                  本文介绍了使用 jQuery 或 JavaScript 读取属性文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我是 jquery 的新手.我想使用 javascript 或 jquery 在我的 jsp 页面中读取 Java 属性文件.我对此很满意,但并不满意.

                  I am newbie in jquery. I would like to read Java properties file in my jsp page using javascript or jquery. I'm goggling about it but not satisfied.

                  我的应用程序是由 Struts2、Eclipse Juno 和 Windows7 开发的.这是我的javascript

                  My application is developed by Struts2, Eclipse Juno and Windows7. This is my javascript

                   function checkedRadioForDelete(f) {
                      var chx = document.getElementsByTagName('input');
                      for ( var i = 0; i < chx.length; i++) {
                          if (chx[i].type == 'radio' && chx[i].checked) {
                              var con = confirm("Are you sure to delete?");
                              if (con != true) {
                              } else {
                                 f.action = "MyAction.action";
                                 f.submit();
                               }
                              return true;
                           }
                      }
                      alert("Please select one.");
                      return false;
                   }
                  

                  这是我的属性文件

                  msg.confirm=Are you sure to delete?
                  msg.alert=Please select one.
                  

                  我想从属性文件中读取 confirmalert 框值.那么使用 Ajax 或 jquery 或 javascript 是否可行?

                  I would like to read confirm and alert box values from properties file. So is it possible with Ajax or jquery or javascript?

                  推荐答案

                  不要在 JSP 中使用 scriptlet,你可以使用 struts2 标签轻松做到.

                  One shouldn't use scriptlets in JSP, you can easily do it using struts2 tags.

                  在 JSP 中更改您的 Javascript,如下所示:

                  Change your Javascript in JSP as follows :

                  function checkedRadioForDelete(f) {
                      var chx = document.getElementsByTagName('input');
                      for ( var i = 0; i < chx.length; i++) {
                          if (chx[i].type == 'radio' && chx[i].checked) {
                              var con = confirm("<s:text name="msg.confirm"/>");
                              if (con != true) {
                              } else {
                                 f.action = "MyAction.action";
                                 f.submit();
                               }
                              return true;
                           }
                      }
                      alert("<s:text name="msg.alert"/>");
                      return false;
                   }
                  

                  这篇关于使用 jQuery 或 JavaScript 读取属性文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                          <i id='zgbug'><tr id='zgbug'><dt id='zgbug'><q id='zgbug'><span id='zgbug'><b id='zgbug'><form id='zgbug'><ins id='zgbug'></ins><ul id='zgbug'></ul><sub id='zgbug'></sub></form><legend id='zgbug'></legend><bdo id='zgbug'><pre id='zgbug'><center id='zgbug'></center></pre></bdo></b><th id='zgbug'></th></span></q></dt></tr></i><div id='zgbug'><tfoot id='zgbug'></tfoot><dl id='zgbug'><fieldset id='zgbug'></fieldset></dl></div>
                            <tbody id='zgbug'></tbody>
                          <legend id='zgbug'><style id='zgbug'><dir id='zgbug'><q id='zgbug'></q></dir></style></legend>

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

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