【发布时间】:2014-06-14 14:21:21
【问题描述】:
我在 jQuery 中有一个 HTML 表格。该 HTML 表格中有几行可用。在该表格中,我在第一个 TD 中附加了 div。第一个 TD 有文本框。div 的默认显示为无。当我第一个输入值时TD div id value=value 输入了第一个 TD 文本框值。像这样我在 HTML 表中输入第一个 TD 后如何附加/分配 div id 值.....我是 JQuery 的新手
$items = $items + '<td width="16px" ><img onclick="pop(this);" id="imgpop" width="16px" style="cursor: pointer;" height="16px" src="../Images/plus.gif" /><input type="text" style="width:80%;" class="mtextbox" autocomplete="off" onfocus="FnAutocomNo(this, \'FWHSortCode\',1);" onblur="createRow(this);" name="txtSortCode" id="txtSortCode" />'; $items = $items + '<input type="hidden" name="hdnSortId" id="hdnSortId" />'; $items = $items + ' <div id="popDiv1" class="menu" style="display:none;"><table id="popup1"><tr><td colspan="10"></td></tr></table></div></td>';
【问题讨论】:
-
你能展示你用过的脚本吗..?
-
它太长了,我如何发布该代码
-
贴出相关代码..
-
只放html和脚本有用的部分。
-
不在这里。在问题中。 Check this link.