zoukankan      html  css  js  c++  java
  • js 循环控件

      var controls = document.getElementById("tbsell").getElementsByTagName('input');

                                    for (var i = 0; i < controls.length; i++) {
                                        if (controls[i].type == 'text') {
                                            controls[i].value = brr[i];
                                        }
                                    }

      <table class="table_noborder_fontleft" id="tbsell" style=" border:0px;">
                                <tr>
                                    <td>
                                        <input type="text" maxlength="10" id="sellpro1" style=" 68px;" />
                                        &nbsp;
                                        <input type="text" maxlength="10" id="sellpro2" style=" 68px;" />
                                        &nbsp;
                                        <input type="text" maxlength="10" id="sellpro3" style=" 68px;" />
                                        &nbsp;
                                        <input type="text" maxlength="10" id="sellpro4" style=" 68px;" />
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <input type="text" maxlength="10" id="sellpro5" style=" 68px;" />
                                        &nbsp;
                                        <input type="text" maxlength="10" id="sellpro6" style=" 68px;" />
                                        &nbsp;
                                        <input type="text" maxlength="10" id="sellpro6" style=" 68px;" />
                                        &nbsp;
                                        <input type="text" maxlength="10" id="sellpro7" style=" 68px;" />
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <input type="text" maxlength="10" id="sellpro8" style=" 68px;" />
                                        &nbsp;
                                        <input type="text" maxlength="10" id="sellpro9" style=" 68px;" />
                                        &nbsp;
                                        <input type="text" maxlength="10" id="sellpro10" style=" 68px;" />
                                        &nbsp;
                                        <input type="text" maxlength="10" id="sellpro11" style=" 68px;" />
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>

  • 相关阅读:
    解决 找不到方法:“Void System.Web.UI.HtmlControls.HtmlForm.set_Action(System.String)”。
    如何衡量CMS系统的好坏
    创业与团队管理的一些观点
    Windows下Memcached的安装与配置
    SQL Server 2005备份维护计划
    写给四岁的领智
    python在接口测试的实际应用
    篇2 安卓app自动化测试初识python调用appium
    篇5 python自动化测试应用Selenium环境篇
    篇1 安卓app自动化测试appium环境篇
  • 原文地址:https://www.cnblogs.com/ggbbeyou/p/1588306.html
Copyright © 2011-2022 走看看