<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head> <body> <table width="400" height="62" border="0" align="left" cellpadding="0"
cellspacing="2">
<tr id="tr_depart">
<td width="400" height="28" nowrap>
<table width="100%" border="1" cellpadding="2" cellspacing="0"
bordercolorlight="#ffffff" bordercolordark="#003399">
<tr align="center" bgcolor="#000099">
<td width="100%" height="33" align="right">
<span class="style51 style53 style1">※※会员账户管理系统※※</span>
<select name="cmbState"
onchange="window.location='accountAction?action=getall&state='+this.value">
<option value="-1" selected>
全部
</option>
<option value="0">
禁用
</option>
<option value="1">
启用
</option>
</select>
</td>
</tr>
</table>
</td>
</tr> <tr id="departQueryTr">
<td height="28" nowrap>
<table id="tabQuery" width="100%" border="1" align="center"
cellpadding="5" cellspacing="0" bordercolor="#D0D0D5"
style="border-collapse: collapse">
<tr style="backgrount-image: url(images/nh-bg.gif)" align="center"
bgcolor="#E7E7FF">
<td height="18" nowrap>
用户名
</td>
<td nowrap>
姓名
</td>
<td nowrap bgcolor="#E7E7FF">
金额
</td>
<td nowrap>
操作
</td>
</tr>
<c:forEach var="row" items="${accountList }">
<tr align="center" bgcolor="#F7F6FB">
<td nowrap>
${row.userId }
</td>
<td nowrap>
${row.realName }
</td>
<td nowrap>
${row.balance }
</td>
<td nowrap> <c:if test="${row.state==0 }">
<a
href="accountAction?action=setState&setState=1&id=${row.id }">启用</a>
</c:if>
<c:if test="${row.state==1 }">
<a
href="accountAction?action=setState&setState=0&id=${row.id }">禁用</a>
</c:if>
<a href="accountAction?action=del&id=${row.id }"
onclick="return confirm('确实要删除吗?')">删除</a>
<a href="javascript:void(0)"
onclick="fillValue(${row.state},${row.id })">充值</a> //我把这行删除 就不报错了  为什么?
</td>
</tr>
</c:forEach>
</table>
</td>
</tr>
</table>
<script type="text/javascript">
function fillValue(state,id){
if(state==0){
alert("该会员已经禁用,不能充值!");
}else{
window.open("fillValue.jsp?id="+id,"","width=230px,height=120px");
}
}
</script>
<script type="text/javascript">
   document.getElementById("cmbState").value=${param.state}; //这行报下面错误:
<!--Multiple annotations found at this line:
- Syntax error on token(s), misplaced 
 construct(s)
- Missing semicolon
- Syntax error, insert "}" to complete Block -->
   </script>
</body>
</html>

解决方案 »

  1.   

    <a href="accountAction?action=del&id=${row.id }"
     onclick="return confirm('确实要删除吗?')">删除</a>
     <a href="javascript:void(0)"后面的那个 } 是全角的, 改下
      

  2.   

    把这错误
    Multiple annotations found at this line:
    - Syntax error on token(s), misplaced  
    construct(s)
    - Missing semicolon
    - Syntax error, insert "}" to complete Block 
     我把<a href="javascript:void(0)"
    onclick="fillValue(${row.state},${row.id })">充值</a> 把这行删了就没错误了. 
      

  3.   

    <a href="accountAction?action=del&id=${row.id}"
    onclick="return confirm('确实要删除吗?')">删除</a>
    <a href="javascript:void(0)"
    onclick="fillValue(${row.state},${row.id})">充值</a>  改了 还在错啊.