1
在我的項目,當我開始一個連結http:從結構化服務//返回如下如何設置窗口手機7中的Web瀏覽器中的圖像寬度和高度?
連結http我添加到webrowser由:
webBrowser.Source =新的URI(linkWeb);
我想在webbrowser中獲取元素HTML!
如何獲取圖像的src並獲取HTML中的圖像鏈接?
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>Advertisement</title>
<script type='text/javascript'>
setTimeout('window.location.replace(\"http://ads.diadiem.com:80/www/delivery/afr.php?refresh=10&zoneid=89&loc=\")', 10000);
</script>
<style type="text/css">
body
{
margin: 0;
height: 100%;
background-color: transparent;
width: 100%;
text-align: center;
}
img
{
height: 50;
width: 480;
}
</style>
</head>
<body>
<a href='http://ads.com:80/www/delivery/ck.php?oaparams=2__bannerid=405__zoneid=89__cb=5bdb20fd07__oadest=http%3A%2F%2Fdownload.com'
target='_blank'>
<img src='http://ads.com:80/www/images/452c68d165d715b0984216bbf60627c0.jpg'
width='320' height='55' alt='' title='' border='0' />
</a>
<div id='beacon_5bdb20fd07' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'>
<img src='http://ads.com:80/www/delivery/lg.php?bannerid=405&campaignid=94&zoneid=89&loc=file%3A%2F%2F%2FApplications%2FInstall%2FCE8AC0B7-9103-4BCD-B9DE-BC3C1D10D814%2FInstall%2F&cb=5bdb20fd07'
width='0' height='0' alt='' style='width: 0px; height: 0px;' />
</div>
</body>
我想
<img src='http://ads.diadiem.com:80/www/images/452c68d165d715b0984216bbf60627c0.jpg'
width='320' height='55' alt='' title='' border='0' />
,並設置高度和寬度,我想
href='http://ads.com:80/www/delivery/ck.php?oaparams=2__bannerid=405__zoneid=89__cb=5bdb20fd07__oadest=http%3A%2F%2Fdownload.com
感謝您的回覆! 但是,我想要href,並調整寬度和高度,因爲web瀏覽器加載完成。 – thongaduka
@thongaduka你是說你想要在頁面上加載內容,然後通過在HTML中設置顯式值來調整高度和寬度? –
我想因爲服務返回給我一個網站鏈接!裏面包含一張圖片和一個鏈接,但這並不介意480的大寬!所以我想出去改變圖像的大小,並得到一個鏈接到另一個,所以當我點擊一個Web瀏覽器將顯示其他 – thongaduka