DWZ 1.4.3 中主从结构BUG问题
模板文件代码如下:
<table class="list nowrap itemDetail" addButton="添加岗位數" width="100%"> <thead> <tr> <th type="lookup" name="post.code[]" lookupGroup="post" suggestFields="post_code" lookupUrl="__APP__/Lookup/PostLookup/selectType/1" size="12" fieldClass="required">岗位编码</th> <th type="text" name="post.name[]" fieldClass="readonly" size="22" readOnly>岗位名称</th> <th type="calculate" name="post.nums[]" fieldClass="required" size="4">编制数</th> <th type="text" name="post.remark[]" size="15">备 注</th> <th onclick="calculate(this,1)" type="del" fieldClass="refreshAmount">删行</th> </tr> </thead> <tbody> <volist id="vo" name="postResult"> <tr class="unitBox"> <td> <input type="hidden" name="post.id[]"> <input class="required textInput" value="{$vo.post_code}" type="text" size="12" lookuppk="id" suggestfields="post_code" suggesturl="undefined" suffix="[]" lookupgroup="post" autocomplete="off" name="post.code[]"> <a class="btnLook" title="查找带回" lookuppk="id" suggestfields="post_code" suggesturl="undefined" suffix="[]" autocomplete="off" lookupgroup="post" href="/aspireWebstite/Admin/index.php/Lookup/PostLookup/selectType/1">查找带回</a> </td> <td> <input class="readonly textInput" type="text" size="22" value="{$vo.post_code|getTableColVal=Post,post_name,post_code}" name="post.name[]" /> </td> <td> <input class="required textInput" type="text" size="4" value="{$vo.post_nums}" name="post.nums[]" /> </td> <td> <input class="textInput" type="text" size="15" value="{$vo.post_remark}" name="post.remark[]" /> </td> <td> <a class="btnDel refreshAmount" href="javascript:void(0)">删除</a> </td> </tr> </volist> </tbody> </table>
IE运行后点击删除行出现错误,但是FireFox却正常可以删除,IE浏览器错误提示如下:
Syntax error,unrecognized expression:[href^=javascript:]
经判断,应该是Jquery兼容问题:
查主题Js文件中问题代码行:
if($btnDel.is("[href^=javascript:]")){
改为:
if($btnDel.is('[href="javascript:void(0)"]')){
问题即解决。