All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
SQL,server2000简介_mssql学习_编程技术
利用PHP上传文件_[PHP教程]
使用javascript来编写动态Html_JavaScript技术_编程技术
PHP按比例控制图片显示(自动缩放函数)_[PHP教程]
PHP中数组元素升序、降序及重新排序的函数_[PHP教程]
delphi设置映射模式
《Effective,C#》:用委托实现回调_[Asp.Net教程]
基于JSON的高级AJAX开发技术_.net资料_编程技术
Spring集成XFire开发WebService_.net资料_编程技术
ASP.NET从零起步设计网站全过程(3)_[Asp.Net教程]
Reading number is top 10 pictures
Very beautiful interior decoration
Female model behind the bitterness, often being overcharged2
这才是真正的人体艺术4
来几张有特色的图片
餐桌上的鱼
俞敏洪在清华终于说了实话
八个盛产美女的国家2
XuRe xuan cool and refreshing photoes2
A man's favorite things3--ZhouWeiTong
赵惟依写真2
Download software ranking
美女写真3
功夫熊猫2(下集)
Ashlynn Video3
Sora aoi's film--cangkong_Blue.Sky
XML+Web+Service开发教程
Tram sex maniac 2 (H) rar bag9
SP3 for SQL2000
仙剑奇侠传98硬盘WINXP版
Call Of Duty2
网络管理员第三版
delv published in(发表于) 2014/1/6 9:06:30 Edit(编辑)
C#如何把html中的相对路径变成绝对路径_[Asp.Net教程]

C#如何把html中的相对路径变成绝对路径_[Asp.Net教程]

C#如何把html中的相对路径变成绝对路径_[Asp.Net教程]

private static string ConvertToAbsoluteUrls (string html, Uri relativeLocation) {
IHTMLDocument2 doc = new HTMLDocumentClass ();
doc.write (new object [] { html });
doc.close ();


foreach (IHTMLAnchorElement anchor in doc.links) {
IHTMLElement element = (IHTMLElement)anchor;
string href = (string)element.getAttribute ("href", 2);
if (href != null) {
Uri addr = new Uri (relativeLocation, href);
anchor.href = addr.AbsoluteUri;
}
}


foreach (IHTMLImgElement image in doc.images) {
IHTMLElement element = (IHTMLElement)image;
string src = (string)element.getAttribute ("src", 2);
if (src != null) {
Uri addr = new Uri (relativeLocation, src);
image.src = addr.AbsoluteUri;
}
}


string ret = doc.body.innerHTML;


return ret;
}


来源:网络







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.