• 待定位的小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>
  • 相关阅读:
    Lerning Entity Framework 6 ------ Defining Relationships
    Lerning Entity Framework 6 ------ Defining the Database Structure
    Lerning Entity Framework 6 ------ Introduction to TPH
    Lerning Entity Framework 6 ------ Introduction to TPT
    Lerning Entity Framework 6 ------ Using a commandInterceptor
    Lerning Entity Framework 6 ------ A demo of using Entity framework with MySql
    C#是否该支持“try/catch/else”语法
    Hadoop学习之旅三:MapReduce
    CLR via C# 摘要二:IL速记
    Java 制表符 " "
  • 原文地址:https://www.cnblogs.com/wangxiuhui/p/3826552.html
Copyright © 2020-2023  润新知