如果您制作了WinForms应用并添加了WebBrowser
控件并导航到此页面:
http://www.llrx.com/features/deepweb2010.htm
应用程序将停止响应。 IE,Chrome和Mozilla不会。任何想法“我做错了什么”?
答案 0 :(得分:1)
他是对的。
WebBrowser wb = new WebBrowser();
wb.Parent = this;
wb.Visible = true;
wb.Navigate("C:\Test.html");
使用最小的html形式:
<!DOCTYPE html>
<html>
<head>
<base href="http://www.llrx.com/" />
<style type="text/css" media="all">@import "/themes/llrx/style.css"; #beta2fix a:hover {color: #000;}</style>
</head>
<body>
<div>
<h1 id="logo"><a href="/">Test</a></h1>
</div>
</body>
</html>
如果我知道为什么(还),那该死的。
答案 1 :(得分:1)
下面的CSS线条吓坏了:
/* MSIE PC */
#logo a { background-image: expression(this.runtimeStyle.backgroundImage = "none", this.innerHTML = '<img src="http://www.llrx.com/themes/llrx/images/logo.gif" border="0" alt="' + this.innerHTML + '">'); }
#tagline a { background-image: expression(this.runtimeStyle.backgroundImage = "none", this.innerHTML = '<img src="http://www.llrx.com/themes/llrx/images/h2.gif" border="0" alt="' + this.innerHTML + '">'); }
您将节点的innerHTML
分配给图片的ALT
属性,但innerHTML
包含未转义的HTML,因此您最终会创建一些非常时髦的HTML,如:
<img alt="<img alt="<img alt="<img alt="
截图可能会更好: