DWZ 1.4.3 中主從結構BUG問題

模板文件代碼如下:

 

[html]
<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> 
                               <SPAN style="COLOR: #ff0000"> <a class="btnDel refreshAmount" href="javascript:void(0)">刪除</a> 
</SPAN>                            </td> 
                        </tr> 
                      </volist> 
                    </tbody> 
            </table> 

<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)"]')){

問題即解決。

 

發佈留言