• <small id='19ki9'></small><noframes id='19ki9'>

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

    2. <tfoot id='19ki9'></tfoot>

        <legend id='19ki9'><style id='19ki9'><dir id='19ki9'><q id='19ki9'></q></dir></style></legend>
      1. 遍历 div 内的输入

        Iterate through inputs inside of a div(遍历 div 内的输入)

                <bdo id='HhIVz'></bdo><ul id='HhIVz'></ul>

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

                    <tbody id='HhIVz'></tbody>
                  本文介绍了遍历 div 内的输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试遍历通过 jQuery 放置在特定 div 上的所有输入,但没有响应.我无法使用警报查看输入的值.我究竟做错了什么 ?

                  I'am trying to iterate through all inputs which are placed on a specific div via jQuery, but there is no response. I can't see the values of inputs by using alert. What am I doing wrong ?

                  <form id="internshipStage2Form" method="POST" action="form2.php">
                      <center>
                          <table id="studentInformation" border="1">
                              <caption style="color:#f00;">Student(Trainee) Information</caption>
                              <tr>
                                  <td valign="middle" align="center">
                                      <label id="stuEmailLabel" for="stuEmailText">E-mail Address</label>
                                  </td>
                                  <td valign="middle" align="center"><?php echo $email; ?></td>
                              </tr>
                              <tr>
                                  <td valign="middle" align="center">
                                      <label id="stuPhoneLabel" for="stuPhoneText">Phone</label>
                                  </td>
                                  <td><input id="stuPhoneText" type="text" name="stuPhoneText"/></td>
                              </tr>
                          </table>
                          <div id="companyInfo">
                              <table id="companyInformation" border="1">
                                  <caption style="color:#f00;">Company Information</caption>
                                  <tr>
                                      <td valign="middle" align="center">
                                          <label id="companyNameLabel" for="companyNameText">Company Name</label>
                                      </td>
                                      <td><input id="companyNameText" type="text" name="companyNameText"/></td>
                                  </tr>
                                  <tr>
                                      <td valign="middle" align="center">
                                          <label id="companyAdressLabel" for="companyAdressText">Address</label>
                                      </td>
                                      <td><input id="companyAdressText" type="text" name="companyAdressText"/></td>
                                  </tr>
                                  <tr>
                                      <td valign="middle" align="center">
                                          <label id="companyPhoneLabel" for="companyPhoneText">Phone</label>
                                      </td>
                                      <td><input id="companyPhoneText" type="text" name="companyPhoneText"/></td>
                                  </tr>
                                  <tr>
                                      <td valign="middle" align="center">
                                          <label id="" for="">Did the any students work as trainees in the company in the previous years?</label>
                                      </td>
                                      <td valign="middle" align="center">
                                          Yes<input id="g1Positive" type="radio" name="g1" value="YES"/>
                                          No<input id="g1Negative" type="radio" name="g1" value="NO"/>
                                      </td>
                                  </tr>
                              </table>
                          </div>
                          <h4 style="color:#f00;">
                              I agree the terms.
                          </h4>
                          <input id="stuDecCheckBox" type="checkbox" name="stuDecCheckBox" /></br>
                          <input id="sendButton" type="submit" name="sendButton2" value="SEND FOR APPROVEMENT"/>
                      </center>
                  </form>
                  

                  JS

                  $('#companyInfo').children('input').each(function () {
                      alert(this.value);
                  });
                  

                  如有任何帮助,将不胜感激.

                  Any help would be appriciated.

                  推荐答案

                  您的输入不是 #companyInfo 的子级.只需这样做:

                  Your inputs are not children of #companyInfo. Just do this:

                  $('#companyInfo input').each(function () {
                      alert(this.value);
                  });
                  

                  这篇关于遍历 div 内的输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
                  quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)
                  CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
                  Ordinals in words javascript(javascript中的序数)
                  getFullYear returns year before on first day of year(getFullYear 在一年的第一天返回前一年)
                  How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?(如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?) - IT屋-程序员软件开发技术分享社

                      <tbody id='cn7Kh'></tbody>
                  1. <small id='cn7Kh'></small><noframes id='cn7Kh'>

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

                      <bdo id='cn7Kh'></bdo><ul id='cn7Kh'></ul>

                        • <legend id='cn7Kh'><style id='cn7Kh'><dir id='cn7Kh'><q id='cn7Kh'></q></dir></style></legend>