• 待定位的小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>
  • 相关阅读:
    果断MARK Flex的那些资源
    利用wamp配置虚拟主机
    wamp+cmd命令行配置zend框架
    [MVVM Light] ViewModelBase
    The WPF Tab Control Inside and Out
    21 Important FAQ questions for WPF and SilverLight
    MIME 多用途互联网邮件扩展
    The Future of Client App Dev : WPF and Silverlight Convergence
    View 中DataContext的设置问题
    [MVVM Light]Messenger 的使用
  • 原文地址:https://www.cnblogs.com/wangxiuhui/p/3826552.html
Copyright © 2020-2023  润新知