如何知道不识别了呢?
MyEclipse--window--Preperences--MyEclipse--Files and Editors--XML--XML Catalog(若出现红色的叉号表示XML识别不了);
新建user_catalog.xml
(其中I:/Eclipse/CommonPlugins/DTD/ 目录下放置各种从网上下载的dtd文件)
如想添加新的dtd文件,修改此配置文件即可。
<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system systemId="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" uri="file:///I:/Eclipse/CommonPlugins/DTD/web-app_2_4.xsd"/>
<public publicId="-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0.1//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/validator_1_0_1.dtd" webURL="http://jakarta.apache.org/commons/dtds/validator_1_0_1.dtd"/>
<public publicId="-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/validator_1_0.dtd" webURL="http://jakarta.apache.org/commons/dtds/validator_1_0.dtd"/> ......
如何知道不识别了呢?
MyEclipse--window--Preperences--MyEclipse--Files and Editors--XML--XML Catalog(若出现红色的叉号表示XML识别不了);
新建user_catalog.xml
(其中I:/Eclipse/CommonPlugins/DTD/ 目录下放置各种从网上下载的dtd文件)
如想添加新的dtd文件,修改此配置文件即可。
<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system systemId="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" uri="file:///I:/Eclipse/CommonPlugins/DTD/web-app_2_4.xsd"/>
<public publicId="-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0.1//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/validator_1_0_1.dtd" webURL="http://jakarta.apache.org/commons/dtds/validator_1_0_1.dtd"/>
<public publicId="-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/validator_1_0.dtd" webURL="http://jakarta.apache.org/commons/dtds/validator_1_0.dtd"/> ......
下面是一个过滤html元素的程序,也许对大家有点帮助!
/**
* filter all html element.
* For example:<a href="www.sohu.com/test">hello!</a>
* The filter result is :hello!
* Notice:This method filter the text between "<" and ">"
* @param element
* @return
*/
public static String getTxtWithoutHTMLElement (String element)
{
// String reg="<[^<|^>]+>";
// return element.replaceAll(reg,"");
if(null==element||"".equals(element.trim()))
{
  ......
下面是一个过滤html元素的程序,也许对大家有点帮助!
/**
* filter all html element.
* For example:<a href="www.sohu.com/test">hello!</a>
* The filter result is :hello!
* Notice:This method filter the text between "<" and ">"
* @param element
* @return
*/
public static String getTxtWithoutHTMLElement (String element)
{
// String reg="<[^<|^>]+>";
// return element.replaceAll(reg,"");
if(null==element||"".equals(element.trim()))
{
  ......
http://blog.stchur.com/2010/01/15/programmatically-clicking-a-link-in-javascript/
作者介绍如何用javascript模拟用户真实的点击。
这看上去好像很简单,读取href然后利用window.location.href不就行了吗?
其实不然,原因在于现在的网页里的链接不单是直接读取href属性然后跳转到另一个页面,有些链接可以加上event handler,这样就要用javascript去模拟点击了。可是光模拟点击链接却不能实现跳转(挺奇怪)。既然是这样,我们可以先用javascript去模拟点击(激发event handler),然后读取href实现跳转。但 这样的话document.referrer就无法保留啦,而且如果event handler是阻止跳转的,这个模拟方法也还是不够真实。
最后作者给出了95%正确的答案:
有ele.click的用ele.click(IE)
没有的先用JavaScript激发,然后动态建立表单,通过表单跳转(其他浏览器) ......
突然一次,想输入上下标,editor不支持,于是乎搜得以下东东。 有的HTML标签你可能从未使用过,不是因为你欠缺学习精神,而是它们确实用处不大。如果你有探索精神,那就接着往下看吧。 第一个:abbr 或 acronym
这两个标识是一回事,主要是用于一些英语的缩写,当你把鼠标移上去的时候,你会发现会出现一个小提示来提示缩写的全称。下面是一个示例: <ABBR title="HyperText Markup Language">HTML </ABBR> <ABBR title="电气电子工程师协会(Institute of Electrical and Electronics Engineers)"> IEEE </ABBR> <ABBR title="Read the Fucking Source Code">RTFSC</ABBR> 第二个:q
这个标识主要就是把引用的文字加上双引号,这个标识看来好像很没有什么意思。官方说是为了方便,可我总觉得这个标识还不如直接输入双引号来的方便。好像的确没什么。难道这个标识只能在Firefox下看到,IE就不支持了。下面是个示例: 这个是一句引言 <Q>这个是一句引言</Q> 这个是一句引言 第三个,bdo
这个 ......
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 ......
<%
int a =1;
out.println("<input type='checkbox' value='"+a+"'>");
%>
<%int b =1 ;%>
<input type="checkbox" value="<%=b %>">
2种实现方式! ......
<%
int a =1;
out.println("<input type='checkbox' value='"+a+"'>");
%>
<%int b =1 ;%>
<input type="checkbox" value="<%=b %>">
2种实现方式! ......