老师我这有莫名其妙的问题
提示说属性color不允许在这儿
forEach那里说不被期待的符号
竟然说color不能匹配任何导入的标签库
1
收起
正在回答
6回答
如下图红框处所示,第二个红框处少了一个引号。
如果我的回答解决了你的疑惑,请采纳!祝学习愉快!
给大佬递茶
2019-01-31 15:05:53
我是把demo文件放到web下的,重写一个不行,jstl标签页没有提示。包已经导入了
<%-- Created by IntelliJ IDEA. User: Administrator Date: 2019-01-31 Time: 12:31 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>员工列表</title> <link href="demo/css/bootstrap.css" type="text/css" rel="stylesheet"></link> <script type="text/javascript" src="demo/js/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="demo/js/bootstrap.js"></script> <style type="text/css"> .pagination { margin: 0px } .pagination > li > a, .pagination > li > span { margin: 0 5px; border: 1px solid #dddddd; } .glyphicon { margin-right: 3px; } .form-control[readonly] { cursor: pointer; background-color: white; } #dlgPhoto .modal-body{ text-align: center; } .preview{ max-width: 500px; } </style> <script> $(function () { $("#btnAdd").click(function () { $('#dlgForm').modal() }); }) </script> </head> <body> <div class="container"> <div class="row"> <h1 style="text-align: center">IMOOC员工信息表</h1> <div class="panel panel-default"> <div class="clearfix panel-heading "> <div class="input-group" style="width: 500px;"> <button class="btn btn-primary" id="btnAdd"><span class="glyphicon glyphicon-zoom-in"></span>新增 </button> </div> </div> <table class="table table-bordered table-hover"> <thead> <tr> <th>序号</th> <th>员工编号</th> <th>姓名</th> <th>部门</th> <th>职务</th> <th>工资</th> <th> </th> </tr> </thead> <tbody> <c:forEach var="emp" varStatus="idx" items="${applicationScope.employee}> <tr> <td>${idx.index+1}</td> <td>${emp.eid}</td> <td>${emp.ename}</td> <td>${emp.edepartment}</td> <td>${emp.ework}</td> <td style="color:color:red;font-weight:bold;">¥<fmt:formatNumber value= "${emp.esalary}" pattern="0,000.00"></fmt:formatNumber> </td> </tr> </c:forEach> </tbody> </table> </div> </div> </div> <!-- 表单 --> <div class="modal fade" tabindex="-1" role="dialog" id="dlgForm"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> </button> <h4 class="modal-title">新增员工</h4> </div> <div class="modal-body"> <form action="/employee/creat" method="post" > <div class="form-group"> <label for="empno">员工编号</label> <input type="text" name="empno" class="form-control" id="empno" placeholder="请输入员工编号"> </div> <div class="form-group"> <label for="ename">员工姓名</label> <input type="text" name="ename" class="form-control" id="ename" placeholder="请输入员工姓名"> </div> <div class="form-group"> <label>部门</label> <select id="dname" name="department" class="form-control"> <option selected="selected">请选择部门</option> <option value="市场部">市场部</option> <option value="研发部">研发部</option> <option value="后勤部">后勤部</option> </select> </div> <div class="form-group"> <label>职务</label> <input type="text" name="job" class="form-control" id="job" placeholder="请输入职务"> </div> <div class="form-group"> <label for="sal">工资</label> <input type="text" name="salary" class="form-control" id="sal" placeholder="请输入工资"> </div> <div class="form-group" style="text-align: center;"> <button type="submit" class="btn btn-primary">保存</button> </div> </form> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> </body> </html>
如果把forEach里的删除就可以显示,不删除500.
从网页搭建入门Java Web2018版
- 参与学习 人
- 提交作业 1088 份
- 解答问题 10205 个
如果你有Java语言基础,又想以后从事Java Web开发,那么本路径是你的不二选择!本路径从网页搭建开始入手,通过大量案例来学习Java Web基础。定能助你完成Java Web小白的蜕变!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星