开发者

how to set Image width and height in web browser in window phone 7?

In my project , When I begin a link http:// returns from services structured as follows

link http i add to webrowser by :

webBrowser.Source = new Uri(linkWeb);

I want to get element HTML in webbrowser!

How can I get src of image and get link of image in 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=5开发者_如何学运维bdb20fd07__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&amp;campaignid=94&amp;zoneid=89&amp;loc=file%3A%2F%2F%2FApplications%2FInstall%2FCE8AC0B7-9103-4BCD-B9DE-BC3C1D10D814%2FInstall%2F&amp;cb=5bdb20fd07'
            width='0' height='0' alt='' style='width: 0px; height: 0px;' />
    </div>
</body>

I want to get

<img src='http://ads.diadiem.com:80/www/images/452c68d165d715b0984216bbf60627c0.jpg'
    width='320' height='55' alt='' title='' border='0' />

and set height and width, and I want to get

href='http://ads.com:80/www/delivery/ck.php?oaparams=2__bannerid=405__zoneid=89__cb=5bdb20fd07__oadest=http%3A%2F%2Fdownload.com


Assuming that linkWeb from your code is the path to an image,
Try:

webBrowser.NavigateToString("<html><body><img src='" + linkWeb + "' height='100' width='200'></body></html>");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜