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

struts1标签之html:optionsCollection

我们常常把一组集合放到每个页面的下拉框中,这里利用struts1的html:optionsCollection可以省很多事。
举个例子:
写一个公共静态方法:
public static Collection<LabelValueBean> getAllType() {
Collection<LabelValueBean> col = new ArrayList<LabelValueBean>();
col.add(new LabelValueBean("所有终端", ""));
col.add(new LabelValueBean("2G全部", "1%"));
col.add(new LabelValueBean("2G手机", "101"));
col.add(new LabelValueBean("3G全部", "2%"));
col.add(new LabelValueBean("3G手机", "201"));
col.add(new LabelValueBean("3G数据卡", "202"));
col.add(new LabelValueBean("3G上网本", "203"));
col.add(new LabelValueBean("3G家庭网关", "204"));
col.add(new LabelValueBean("3G无线固话", "205"));
return col;
}
然后在请求action的时候放到request中。如:request.setAttribute("types",xxx.getAllType());
在页面上可以显示为:
<nested:select property="yourproperty">
      <html:optionsCollection name="types"/>
</nested:select>
这样就可以在页面上得到一个下拉列表,这样做的好处之一就是书写简单,方便后期维护


相关文档:

从html到flex

网站开始
从纯的文本可是变成了有字有图的html静态站点
然后从html 变化到了asp  php 等动态站点
然后出现ajax 实现了无刷新技术
到了今天一个页面 无跳转
变化可谓真大
我想以后迎接我们的就是
一个页面 桌面式 网上冲浪
flex 这样的技术08年还很少
09年悄悄开始兴起
2010年的现在 开始热播了
......

html解析 网页颜色编码表

网页预定义颜色编码列表
const unsigned int gl_color_value[] = {
 0xF5F5DC,
 0x000000,
 0xFF0000,
 0xD2B48C,
 0xFFD700,
 0x008080,
 0xF0E68C,
 0x00FF00,
 0x00FFFF,
 0x0000FF,
 0x00FFFF,
 0xFF7F50,
 0x008000,
 0xFDF5E6 ......

HTML 服务器控件语法

<script language="C#" runat="server">
  void Page_Load(Object sender, EventArgs e) {
    Message.InnerHtml = "Welcome to ASP.NET";
  }
</script>
...
<span id="Message" style="font-size:24" runat="server"/> ......

php正则取嵌套html标签

<?php
$s = <<<html
<html>
<head>
<title>nested tag test</title>
<mce:script type="text/javascript"><!--
alert('fdsafdasfasd');
// --></mce:script>
</head>
<body>
<div id=0>
<div id=1><img name="im ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号