struts html:link标签的用法(转)
关于<html:link>标签在URI后面传参数的问题
在struts标签<html:link>的page属性指定的URI后面传递参数可以有几种方式:
1.若明确参数名和参数值则直接在URI后输出,
如:<html:link page="/test.do?action=add">add</html:link>
2.对于参数值不确定的,paramName和paramProperty来输出,用paramId属性指定参数名。
对于paramName指定的对象应该存在于page、request、session、application其中之一。一般来说,是从Action类传过来的,作为request的属性之一(requst.setAttribute("name",object))。
如果paramName指定的对象是action的ActionForm,则无需使用request.setAttribute方法。
例:<html:link page="/test.do" paramId="userid" paramName="uid">uname</html:link>
若参数值是一个bean对象的属性值(比如ActionForm,或者集合中存放的对象)则:
<html:link page="/test.do" paramId="userid" paramName="user" paramProperty="uid">uname</html:link>
3.若两个参数,一个确定一个不确定,则是以上两种方法的结合,即:
<html:link page="/test.do?action=mod ......
Data visualization is mostly achieved with flash applications or
with help of some programming languages. Are those solutions the only
way to present, let's say simple data chart? How about giving it a try
with nothing but good ol' css?
Take a look at the Demo
| Download Css Chart
Approach
In this example I am not using JavaScript or any backend application. All I rely on is well formed markup and css.
So, the goal is to present data chart. We could say that a chart is a
two dimensional object. So, the best structural and semantical choice
is definition list. Why? Well, for starter, it is a list of items.
Although the list is linear, we could interpret definition titles (dt
elements) as items on x axis and definition descriptions (dd elements)
as values on y axis.
If that doesn't make sense because of my poor explanation skills :) what I'll do here is turn this:
into this
with css alone.
The markup
In my example I have used a period of last 12 days and presented ......
.ie
{
border:1px solid #000000;
width:100px;
height:300px;
font-size:12px;
}
.ie div
{ text-over:
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
文本自动缩短后加...(省略号) ......
注:本学习笔记只是自己的一些备忘,初学者的东西不具有参考性,请到W3School(http://www.w3school.com.cn/css/index.asp)进行系统学习。 学习CSS我使用的工具是Visual CSS,可以实现同步预览,快速学习编辑CSS。 1.CSS的作用:用来规定网页中的内容的显示方式,避免给HTML增加很多的属性而将代码变得臃肿。 2.CSS的应用方式 (1)内联样式:在标签中包括一个style属性,并在其后定义CSS属性及值,例如:Hello world! (2)文档级样式表:将一系列样式规则罗列在HTML文档开头,处于内的和之间,它可以改变外部样式表中定义的一个或多个规则,创建一个个性化的文档,适用于单个HTML文件。 (3)外部样式表:将样式定义放置于分离的文档中,在各个需要应用该样式表的HTML通过在内的标签引入这个分离文档,例如。每次打开页面都需要下载这个表格,所以要尽量减小样式表的容量。 注意:三种样式表作用域不同,同时存在时的页面处理原则为: “近优先于远”——内联样式>文档级样式。 “局部优先于整体”——定义为标签的类的属性>为标签总体进行定义的属性 “特殊优先于一般”——上下文样式>为标签总体进行定义的属性 “后优先于前” ......
W3School:http://www.w3school.com.cn/css/index.asp
英文版网址:http://www.w3schools.com/css/default.asp
作为初学者,这是一定要收藏的网站。这就相当于一本CSS入门教程,在此可以学习每个标签,属性的用法和实例,可以自动动手实践代码。除了CSS的知识,这个网站还包括了大量其他网页开发语言教程和其他知识。
CSS Tricks:http://css-tricks.com/
这是Chris Coyier的博客,书写了大量与网页制作和CSS相关的文章,譬如最新技术的研究和实践,实例剖析,非常值得收藏阅读。
CSS Beauty:http://www.cssbeauty.com/
这里有大量的CSS实例,技巧,你可以在这里找到很多很炫的东西,把它们添加到自己的网站是个很不错的选择哦!
蓝色理想:http://www.blueidea.com
这个,大家都应该很熟悉,就不用介绍了吧。
欢迎大家一起分享好的CSS学习网站,我们一起努力! ......
下面是CSS最常用和实用的技巧。
1.重置浏览器的字体大小
重置浏览器的默认值 ,然后重设浏览器
的字体大小你可以使用雅虎的用户界面重置
的CSS方案 ,如果你不想下载9MB的文件,代码如下:
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,
blockquote,th,td {margin:0; padding:0; }
table { border-collapse:collapse; border-spacing:0; }
fieldset,img { border:0; }
address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; }
ol,ul { list-style:none; }
caption,th { text-align:left; }
h1,h2,h3,h4,h5,h6 { font-size:100%; font-weight:normal; }
q:before,q:after { content:”; }
abbr,acronym { border:0; }
其次,我们重设浏览器字体的大小为10像素,使用如下:
html {font-size: 62.5%;}
这个大小基本合适,然后您可以根据自己的需要调整大小,如 标题1为120像素:
h1 {font-size: 2em;}
2.设置水平居中
大多数的网站目前都是固定宽度的。CSS代码如下:
div#container {margin: 0 auto;}
3.控制位置:绝对位置 ......