002——Html中使用JavaScript —— <script>

6个属性

  • async // 立即下载,多个脚本互不依赖立即执行 xhtml中设置async=“async"

  • charset  // 指定字符集

  • defer // 立即下载但延迟到</html>之后执行

  • language // 已弃用,表示编码脚本语言

  • Src   // 外部引用

  • type // language替代属性,默认text/javascript

 

XHTML中的特殊解析语法 <  =  &lt;

为方便理解,用CData片段包含js代码

<script type=“text/javascript”> <! [CDATA[

    // TODO ...

]]></script>

 

不支持XHTML的浏览器注释掉CDATA

 

<html> <head> <title>人员管理界面</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.11.3.min.js"></script> </head> <body> <div class="container"> <div class="row clearfix"> <div class="col-md-12 column"> <div class="page-header"> <h1> <small>员工列表 —— 显示所有员工信息</small> </h1> </div> </div> </div> <div class="row clearfix"> <div class="col-md-12 column"> <table class="table table-hover table-striped"> <thead> <tr> <th>ID</th> <th>姓名</th> <th>电话号</th> <th>地址</th> <th>职位</th> <th>职位编号</th> <th>状态</th> <th>证件照</th> </tr> </thead> <tbody> <c:forEach items="${employees}" var="employees"> <tr> <td>${employees.id}</td> <td>${employees.name}</td> <td>${employees.phonenumber}</td> <td>${employees.address}</td> <td>${employees.job}</td> <td>${employees.jobid}</td> <td>${employees.state}</td> <td><img src="${pageContext.request.contextPath}/images/${employees.pic}" style="width: 100px; height: 50px"></td> <td> <a href="${pageContext.request.contextPath}/toupdate/${employees.id}">更改</a> | <a href="${pageContext.request.contextPath}/delete/${employees.id}" onclick="return confirm('确定要删除吗?')">删除</a> </td> </tr> </c:forEach> </tbody> </table> </div> </div> </div> </body> </html>给这个界面的表格实现一个分页的功能,每页的最大数目为5
06-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值