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

搜索之路 c#从html中提取文本

直接封装成一个类的,用起来还挺方便的
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text.RegularExpressions;
/// <summary>
/// HtmlExtract 抽取html里面的文本信息
/// </summary>
public class HtmlExtract
{
   
        #region private attributes
        private string _strHtml;
        #endregion
        #region public mehtods
         public HtmlExtract(string inStrHtml)
        { _strHtml = inStrHtml;}
        public string ExtractText()
        {
            string result = _strHtml;
            result = RemoveComment(result);
            result = RemoveScript(result);
            result = RemoveStyle(result);
            result = RemoveTags(result);
            return result.Trim();
        }
        #endregion
     #region private methods
       private string RemoveComment(string input)
{
string result = input;
//remove comment
result = Regex.Replace(result, @"<!--[^-]*-->", string.Empty, RegexOptions.IgnoreCase);
return result;
}
     


相关文档:

java的Qname在C#中对应的是什么

首先了解一下什么是Qname
下面是一篇写的比较好的关于Qname的介绍:
http://blog.csdn.net/fbysss/archive/2007/06/24/1664076.aspx
可见Qname主要是处理namesapce的,是指具有特定前缀的xml element。而且Qname就是QualifiedName的缩写,所以Qname在C#中对应的应该是XmlQualifiedName这个类 ......

C#开发XML WebService接口(SOAP)

原文链接:http://www.cnblogs.com/ding0910/archive/2007/07/12/815407.html
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using BX.Interface; ......

HTML显示日期时间代码 [js 特效代码]

一种:
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>兼容FireFox的当前时间的JS脚本</title>
</head>
<body>
<DIV id=time>当前时间
<SCRIPT>document.getElementById('time').innerHTML=new Date().toLo ......

HTML标签 optgroup 【select 使用】


学无止境!!!
 
今天在论坛回答帖子,学到了一招,select原来可以使用optgroup 标签,对option进行分类!
 
特意从网上摘录了下面的文章...
在 html里,optgroup这个元素对于我来说很少用到。最近在公司做项目时使用了一下,感觉不错,可以对数据进行分类。但在使用JavaScript 添加optgroup时,在IE与Fire ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号