获取URL对应的HTML文档及用正则做replace
System.Net.WebRequest request = System.Net.WebRequest.Create("http://la.jmw.com.cn/c.asp");
request.UseDefaultCredentials = false;
System.Net.WebResponse response = request.GetResponse();
System.IO.Stream resStream = response.GetResponseStream();
System.IO.StreamReader sr = new System.IO.StreamReader(resStream, System.Text.Encoding.Default);
string m_str = System.Web.HttpUtility.HtmlEncode(sr.ReadToEnd());
Response.Write(m_str);
System.Text.RegularExpressions.Regex r = new System.Text.RegularExpressions.Regex(@"[^0-9]");
//m_str = m_str.Replace(r, "");
if (r.IsMatch(m_str))
{
m_str = r.Replace(m_str, "");
}
Response.Write(m_str);
resStream.Close();
sr.Close();
相关文档:
HTML Parser is a Java library used to parse HTML in either a linear or nested fashion. Primarily used for transformation or extraction, it features filters, visitors, custom tags and easy to use JavaBeans. It is a fast, robust and well tested package.
code download:http://sourceforge.net/pr ......
Teach Yourself Visually Html And CSS
Pro CSS and HTML Design Patterns
JavaScript and DHTML Cookbook 2nd Edition
The Right Way Using HTML & CSS
网页制作完全手册
HeadFirst HTM ......
我们在用Flex进行开发的时候,有时候需要实现像html 细线表格的那种效果,原理很简单,但是需要一些技巧,不然的话很难控制线条的粗细,其实只需要设置几个样式就能搞定,一下是源码,大家可以运行一下看看效果<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml ......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>use html as DOM</title>
<mce:script language="javascript" type="text/javascript"><!--
function addUser() {
// get and execute na ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>用javascript动态添加删除html元素</title>
<script type="text/javascript"><!--
function $(nodeId) {
re ......