截取WINfrom中HTML的标签!!! - .NET技术 / C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Text.RegularExpressions;
using System.Web;
namespace WindowsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public static string Ubb(string Htmlstring) {
Htmlstring = Regex.Replace(Htmlstring, @"<script[^>]*?>.*?</script>", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"<(.[^>]*)>", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"([\r\n])[\s]+", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"-->", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"<!--.*", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(quot|#34);", "\"", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(amp|#38);", "&
相关问答:
我用js在html中添加空间的方式可以在ff下的html文件中输出mathml公式,代码如下:
=================================
<head>
<script type="text/javascript">
var myns = &qu ......
比如我想做一个这样的网站:
获取外部html的代码,例如 http://www.cnblogs.com/ioriliao/ 的html代码然后用dom进行
解释。
现在遇到的问题就是如何去获取外部的html代码。
请高人指点。谢谢!
ie --》保存
......
在C#中怎么把一个Excel保存成为一个Html文件?
如同在Excel中 文件——保存为——格式选为html 生成的文件 及文件夹(在多张sheet 时)
引用
excelapp.Workbooks[1].PublishObjects ......
form表单下拉框的蓝色怎么去掉呢,我想把下拉框的颜色设为透明的
may be no way.
像QQ空间里的那些透明的下拉框是怎么弄得呢?
引用
像QQ空间里的那些透明的下拉框是怎么弄得呢?
用层模拟的吧
基本都 ......
我的ajax的updatepanel控件里的面不能执行response.write,可是我需要弹出对话框,我要怎么做呢?
有没有不需要response.write弹提示框的做法呢?
另外我的页面上有一个web用户控件,然后放一个gridview在updatepa ......