开发者

window.location.reload(true) only works in real browsers, not VB.net WebBrowser Control

开发者 https://www.devze.com 2023-03-08 20:20 出处:网络
I have a button on my webpage that r开发者_如何学Cuns some javascript code: alert("Will refresh now");

I have a button on my webpage that r开发者_如何学Cuns some javascript code:

alert("Will refresh now");

window.location.reload(true);

It works in all the browsers we've tested it in.

But when I display that webpage inside my vb.net executable (in a WebBrowser control)... the "refresh" code is definitely run, but it just clears the screen.

Does anyone know why?


I just tried this very simple bit of HTML/Javascript and the page refreshes just fine for me.

<html>
<head><title>Test</title></head>
<body>
<script type="text/javascript">var d = new Date(); document.write(d);</script>
<input type="button" onclick="window.location.reload();" value="Click"/>
</body>
</html>
0

精彩评论

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