dwz 通过js 动态生成的查找找回按钮需要手动绑定lookup() 方法

   最近在用dwz的查找找回功功能的时候,直接写在页面上的标签都是正常的,如:

<a class="btnLook"  href="${base}/lb/imageStore_suggestList" lookupgroup="topicContents[0]"  title="选择图片">选择图片</a>

 但是通过js 动态生成的表总是有问题,最后才发现需要手动绑定下lookup 方法如:


var topicIndex = 1;
 function addTopic(btn){
  var html = '<tr>';  
      html += '<td>'+topicIndex + '</td>';
      html += '<td><input type="hidden" name="topicContents['+(topicIndex-1)+'].coverId">';
      html += '<img name="topicContents['+(topicIndex-1)+'].cover" width="120" height="90">';
      html += '<a class="btnLook" rel="pageTopic'+topicIndex+'" target="dialog" href="${base}/lb/imageStore_suggestList" lookupgroup="topicContents['+(topicIndex-1)+']"  title="选择图片">选择图片</a>';
      html += '</td>';
      html += '<td><input type="text" class="textInput" name="topicContents['+(topicIndex-1)+'].title"></td>';
      html += '<td><input type="text" class="textInput" name="topicContents['+(topicIndex-1)+'].type"></td>';
      html += '<td><a class="btnLook"  href="${base}/lb/article_suggestList" lookupgroup="topicContents['+(topicIndex-1)+']"  title="选择文章">选择文章</a></td>';
      html += '</tr>';
     $("#contentTbody"+topicIndex).append(html);  
     debugger;
   <span style="color:#ff6666;">  $("#contentTbody").find(".btnLook").each(function(){
        $(this).lookup();
     });</span>


评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值