DWZ 1.4.3 中主从结构BUG问题

本文详细介绍了在使用特定模板文件代码时,IE浏览器在删除行操作中遇到的Syntaxerror错误,通过修改JS文件中的代码实现兼容性解决。

模板文件代码如下:

 

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

问题即解决。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值