Commit cf4ef99f3531e168603e058dbe6ad0323114d2bb
1 parent
e2888ba8
修改链接跳转问题
Showing
1 changed file
with
6 additions
and
5 deletions
FRControl/WebView.cs
... | ... | @@ -94,7 +94,7 @@ namespace FRControl |
94 | 94 | FRControl.ZoomBrowser.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, |
95 | 95 | xbili, IntPtr.Zero); |
96 | 96 | |
97 | - this.elem_Click(); | |
97 | + //this.elem_Click(); | |
98 | 98 | //HtmlElementCollection elementCollection = this.webBrowser1.Document.GetElementsByTagName("b"); |
99 | 99 | //if (null != elementCollection) |
100 | 100 | //{ |
... | ... | @@ -143,7 +143,7 @@ namespace FRControl |
143 | 143 | if (elem.GetAttribute("className").ToString().Equals("lanmu")) |
144 | 144 | { |
145 | 145 | isLoad = true; |
146 | - //elem.SetAttribute("className", "lanmuc"); | |
146 | + elem.SetAttribute("className", "lanmuc"); | |
147 | 147 | //elem.Click += new HtmlElementEventHandler(elem_Click); |
148 | 148 | } |
149 | 149 | } |
... | ... | @@ -161,9 +161,9 @@ namespace FRControl |
161 | 161 | { |
162 | 162 | foreach (HtmlElement elem in elementCollections) |
163 | 163 | { |
164 | - if (elem.GetAttribute("className").ToString().Equals("lanmu")) | |
164 | + if (elem.GetAttribute("className").ToString().Equals("lanmuc")) | |
165 | 165 | { |
166 | - elem.SetAttribute("className", "lanmuc"); | |
166 | + //elem.SetAttribute("className", "lanmuc"); | |
167 | 167 | elem.Click += new HtmlElementEventHandler(jcyClick); |
168 | 168 | } |
169 | 169 | |
... | ... | @@ -315,7 +315,8 @@ namespace FRControl |
315 | 315 | { |
316 | 316 | // 使其他浏览器无法捕获此事件 |
317 | 317 | // 阻止了其他浏览器显示网页,而是采用WebBrowser打开网页 |
318 | - //e.Cancel = true; | |
318 | + webBrowser1.Url = new Uri(((WebBrowser)sender).StatusText); | |
319 | + e.Cancel = true; | |
319 | 320 | } |
320 | 321 | } |
321 | 322 | } | ... | ... |