易截截图软件、单文件、免安装、纯绿色、仅160KB

使用DisplayTag和JavaScript创建增强型的表格


Every Web developer has to tangle with tables. A new open source library, DisplayTag, can make life with tables much more organized. Find out how to combine the DisplayTag library with JavaScript to make a slick app that displays line item details.  
by Stephen Strenn
isplaying data in a table is everyday work for Web application developers. In this 10-minute solution, you will learn how to quickly create feature-rich tables for your JSP pages using the DisplayTag library and a little JavaScript. Specifically, the table features that we want include:
Alternating row colors
Column sorting and formatting
Row-grouping with subtotals for selected columns
Page navigation
Export to XML, Excel, PDF, and CSV
Support for standard JSP and the Expression Language (EL)
Row interactivity—a row is highlighted as the mouse passes over it, and if the user clicks anywhere on the row, a new request is generated that includes a parameter indicating which row was clicked.
This article includes a sample application called DisplayTagEx that displays line item details for multiple orders. (View a live demo of DisplayTagEx. A screen shot can be found in Figure 1.) Line items are grouped by order and subtotals are provided for each group. Clicking anywhere on a row takes the user to a page with more complete information about the selected item.
 
 
Listings 1 and 2 contain the source for OrderDetails.jsp and displaytagex.css, respectively.
The specific environment used to develop and deploy the article's sample application was DisplayTag library v1.1, JDK 5.0, MyEclipse 4.1, and Tomcat 5.5. However, the steps described in this article apply to any JSP developer looking to add data tables to his or her web application.
http://assets.devx.com/articlefigs/15427.png
Figure 1. A Better Table: DisplayTagEx uses the DisplayTag library and a little JavaScript.
You want to quickly add feature-rich data tables to your JSP web application.
Use the o


相关文档:

JavaScript字面量

      在JavaScript里,字面量包括:字符串字面量,数组字面量,函数字面量和对象字面量。
      1.字符串字面量
         var str = "Hello World!";
         &ldquo ......

JavaScript学习_Chrome与Internet Explorer

Chrome 拥有更快速的JavaScript;
编写如下小程序:
<html>
<script language = "javascript">

var sum = 0;
var start = new Date;
for(var i = 0; i < 1000001; i++){
sum+=i;
}
var stop = new Date;
document.write("从1到1000000的累加结果:" + sum + ";" + "<br/> ......

javascript面向对象学习

简介

在javascript
中我们最通常的做法是定义一个一个的方法(function)
,然后通过个个function
之间的调用来实现某个功能,也就是可以这样讲,function
似乎是js
中的一个最小组织单元,
我们已经熟悉了各种面向对象对象语言(java,c#..),
我们已经习惯了使用各各类来封装各个操作,让后通过各个对象之间的交 ......

DropDownList调用javascript控制表格行tr的显示与隐藏

DropDownList调用javascript控制表格行tr的显示与隐藏
<mce:script language="javascript"><!--
function cao() {
if(document.all.ddl_class.value=="0")
{
hongtou.style.display="none";
wailai.style.display="none";
wailai1.style.display ......

JavaScript 倒记时器

看过香港和澳门回归的倒记时器没有,是不是想给自己的比较有意义的日子一个记时器提醒自己,JavaScript给了我们这个机会去实现我们的想法,看看下面的例子:
在<body>和</body>标签间输入以下代码
<SCRIPT LANGUAGE="JavaScript">
var urodz= new Date("December 25,2002");
var s="圣诞节";
//获取 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号