<a href=“javascript:void(0);></a>跳转到错误空标签

错误:点击切换会导致点击跳转到错误空标签

<a href="javascript:void(0);" title="">艺术</a>
<a href="javascript:void(0);" class="hover" title="">文商</a>
<a href="javascript:void(0);" title="">理工</a>
<a href="javascript:void(0);" title="">医药</a>
<a href="javascript:void(0);" title="">艺术</a>

改为:

<a style="cursor:pointer" class="hover" title="">文商</a>
<a style="cursor:pointer" title="">理工</a>
<a style="cursor:pointer" title="">医药</a>
<a style="cursor:pointer" title="">艺术</a>

<!--style="cursor:pointer" 为显示光标小手样式-->

<h3>新闻发布系统>>新闻管理>>查询新闻</h3> <center> <form action="SelectNews" method="post"> 请输入查询条件:<input type="text" name="key"> <input type="submit" value="查询"> </form><br> <table border="1" width="70%" cellpadding="0" cellspacing="0"> <tr align="center"> <td>编号</td> <td>标题</td> <td>类型</td> <td>发布人</td> <td>发布日期</td> <td>状态</td> <td>是否头条</td> <td colspan="4">操作</td> </tr> <c:forEach items="${newsList }" var="news"> <tr align="center"> <td><input type="checkbox" name="newsIds" value="${news.nid}"></td> <td>${news.nid }</td> <td>${news.title }</td> <td>${news.type }</td> <td>${news.userName }</td> <td>${news.pubtime }</td>adadada <td> <c:choose> <c:when test="${news.state==0 }">待审核</c:when> <c:when test="${news.state==1 }">通过</c:when> <c:otherwise>未通过</c:otherwise> </c:choose> </td> <td> <c:choose> <c:when test="${news.top==0 }">否</c:when> <c:otherwise>是</c:otherwise> </c:choose> </td> <td>${news.top==0?"是":"否" }</td> <td> <a href="NewsDetail?nid=${news.nid }&op=show">查看</a> <c:if test="${user.rule==0 || user.uid ==news.uid }"> <a href="NewsDetail?nid=${news.nid }&op=update">修改</a> </c:if> <c:if test="${user.rule==0 }"> <a href="newsDelete.jsp?nid=${news.nid }">  删除</a> </c:if> <c:if test="${user.rule==0 }">  审核</c:if> </td> </tr> </c:forEach> </table> <c:if test="${user.rule==0}"> <button type="button"><a href="javascript:void(0)" onclick="banchDelete()">批量删除</a></button> </c:if> </center> </body> <script type="text/javascript"> function banchDelete(){ var idsArray = document.getElementsByName("newsIds"); var nidArray=[];//用于存储需要删除的新闻编号 for(k in idsArray){ if(idsArray[k].checked){ nidArray.push(idsArray[k].value); } } if(nidArray.length==0){ alert("请选择要删除的新闻"); return } window.location.href="./newsBanchDelete.jsp?nids="+nidArray.join(",");//window.location.href 方法是javascript的页面跳转代码 } </script>
06-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值