如何使用Jquery更改applet名称

时间:2017-08-08 21:27:12

标签: jquery applet

当我尝试更新Applet名称时使用JQuery,它正在创建一个新属性“submitName”,而不是更新现有的applet名称。如何更新Applet名称?我能够成功更新Applet ID。

这是我的小程序:

<APPLET NAME="Test1" id="GridRow1" CODEBASE="/XMII/Classes" CODE="iGrid" ARCHIVE="illum8.zip" style="font-size: 10pt; width: 342px; display: inline; height: 72px;" align="top"> </APPLET> 

这是我的JQuery代码:

$('#' + curRowId).clone().attr('id',newRowId).insertAfter($('#' + curRowId));

克隆完成后,我正在更新ID和名称。

$('#' + newRowId).find('*').each(function () {
                if(parseFloat(newRowNum) <= 4()){
                    $(this).attr("id", String($(this).attr("id")).substr(0,String($(this).attr("id")).length-1) + newRowNum);
                    newAppletName = String($(this).attr("name"));
                    if (newAppletName != "undefined") { 
                        $(this).attr("name", newAppletName.substr(0, String(newAppletName).length-1) + newRowNum);
                    }
                }
        });

0 个答案:

没有答案