请问下面的代码是不是我写错了?为什么不生成第二行??????
function AddExtend(){
if(''==$("#txt_AddExtend").val())
{
alert("请填写要添加的扩展属性!");
return;
}
}
var count=document.getElementById("setExtent").lastChild.childNodes.length;
if(count==9)
{
$("#setExtent").append("</tr><tr><td op='SKUName'style='width:100px;text-align: right;'>"+$("#txt_AddExtend").val()+":</td><td><input name='txt_AddSKUValue' type='text' style='width:120px;' Extend='Extend'/></td>");
}
else
{
$("#setExtent").append("<td op='SKUName'style='width:100px;text-align: right;'>"+$("#txt_AddExtend").val()+":</td><td><input name='txt_AddSKUValue' type='text' style='width:120px;' Extend='Extend'/></td>");
}
};
<div>
<a href="javascript:void(0);" op="AddExtend" style="text-decoration: none;" onclick="AddExtend();">
添加扩展属性</a><input id="txt_AddExtend" type="text" style="margin-left: 25px; width: 70px;" /></div>
<table id="setExtent">
<tr></tr>
</table>