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

HTML:MESSAGES,HTML:ERRORS,用法


=======<html:messages>============
Action 中 :
    ActionMessages message = new ActionMessages();
    message.add(" 消息句柄 ",new ActionMessage(" 资源文件中 Key 值 ",String 类型描述信息 ));
    this.addMessages(request,message);
    return ActionForward;
JSP 页面中 :
    <html:messages id=" 指定使用消息的标识 " property=" 消息句柄 " message="true|false">
       <bean:write name=" 以上所指 ID 标识 "/>
    </html:messages>
==========<html:errors>==============
Action 中 :
    ActionMessages message = new ActionMessages();
    message.add(" 消息句柄 ",new ActionMessage(" 资源文件中 Key 值 ",String 类型描述信息 ));
    this.saveErrors(request,message);
    return ActionForward;
JSP 页面中 :
    <html:errors property=" 消息句柄 "/>
如果Action中这样设定(false),页面的提示信息将不从资源文件里读取:
    ActionMessages message = new ActionMessages();
    message.add("消息句柄",new ActionMessage("String类型描述信息",false));
    this.saveErrors(request,message);
    return ActionForward;
JSP页面:
    <html:errors/>或<html:errors property="消息句柄"/>


相关文档:

ASP移除所有HTML代码的函数

代码如下:
Function RemoveHTML(strText)
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>"
RegEx.Global = True
RemoveHTML = RegEx.Replace(strText, "")
RemoveHTML = replace(RemoveHTML," "," ")
End Function
这是最基本的正则替换,有某些特殊字符还没过滤,可自行添加 ......

html常用标记

<html>
<head>
<title>标题<title>
</head>
<body>..........文件内容..........
</body>
</html>
1.文件标题
<title>..........</title>
2.文件更新--<meta>
【1】10秒后自动更新一次
<meta http-equiv="refresh" content=10>
【2】10秒后自动连结到另一文件
<meta http-equiv="ref ......

从数据库中取值批量生成html文件

1. web.config
<connectionStrings>
<add name ="myconn" connectionString="Data Source=who\SQLEXPRESS; Initial Catalog=dbname;Integrated Security=True;" providerName="System.Data.SqlClient"/>
</connectionStrings>
2.
string htmlPath = "D:\\htmlFiles";
......

html中加载flash后的路径问题

在页面A中加载了一个flash文件a.swf后,a.swf的路径就会变成A所在的路径。如果在a.swf中要加载b.swf时,这时候的路径就要进行相应的处理。
本来按照a.swf和b.swf在磁盘中的存放路径,a中加载b是很简单的,但是现在a.swf已经变成页面A所在的路径了,如果还是安装原来的路径去加载b.swf就加载不了了。因此可以在as代码加载b ......

在html中控制自动换行

在网上搜寻到2中解决方案:
1.其实只要在表格控制中添加一句
<td style="word-break:break-all">就搞定了。
其中可能对英文换行可能会分开一个单词问题:解决如下:
语法:
word-break : normal | break-all | keep-all
参数:
normal :  依照亚洲语言和非亚洲语言的文本规则,允许在字内换行
break-all ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号