zoukankan      html  css  js  c++  java
  • 待定位的小bug

    var newOption = '<tr id="option' + optionIndex_BusinessApplication + '_WorkRequirement">'
            + '<td><input type="text" id ="number' + optionNumber_BusinessApplication + '_WorkRequirementID" name="number'
                + optionIndex_BusinessApplication + '_WorkRequirement" style="text-align:center;"  size="5" readonly="true" value="' + optionNumber_BusinessApplication + '"></td>'
            + '<td><select id="myLove'+optionIndex_BusinessApplication+'" name="workType' + optionIndex_BusinessApplication
                + '_WorkRequirement" style="100%;"><option value="检定">检定</option><option value="校准">校准</option></select></td>'
            + '<td><input value="' + jsonData.rows[i].workRequirement + '" type="text" name="workRequirement' + optionIndex_BusinessApplication
                + '_WorkRequirement" style="99%;"></td>'
            + '<td><a  id="delWorkRequirement' + optionIndex_BusinessApplication
                + '_BusinessApplication" href="javascript:void(0)" onclick="WorkRequirement_BusinessApplication(' + optionIndex_BusinessApplication + ')">删</a></td>'
            + '</tr>';
    
                $('#WorkRequirement_BusinessApplication').append(newOption);
                //$('#myLove' + optionIndex_BusinessApplication).val("校准");
                $('input[name="workType' + optionIndex_BusinessApplication + '_WorkRequirement"]').attr('value','校准');

    这个写法无效:

     $('input[name="workType' + optionIndex_BusinessApplication + '_WorkRequirement"]').attr('value','校准');
    换成下面的也无效:
     $('input[name="workType' + optionIndex_BusinessApplication + '_WorkRequirement"]').val('校准');
    但是用这个就没问题:
    //$('#myLove' + optionIndex_BusinessApplication).val("校准");

    相关的html页面代码为:
    <table width="100%" id="WorkRequirement_BusinessApplication" border="1" cellspacing="0" cellpadding="0" bordercolor="#808080">
                                    <thead>
                                        <tr>
                                            <th width="50">序号</th>
                                            <th width="80">工作类型</th>
                                            <th>工作要求</th>
                                            <th width="100">操作</th>
                                        </tr>
                                   </thead>
    </table>
  • 相关阅读:
    MySQL存储过程详解 mysql 存储过程(转)
    JDBC数据库常用操作(mysql)
    [转]Tomcat处理一个HTTP请求的过程
    [转]Tomcat工作原理详解
    MySQL性能优化的最佳20+条经验(转)
    CSS字体中英文名称对照表(转)
    XML的基本用法(转)
    Maximum file handles allowed by OS
    Tips on rendering interiors
    Performance profile of a typical interior scene
  • 原文地址:https://www.cnblogs.com/wangxiuhui/p/3826552.html
Copyright © 2011-2022 走看看