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>
精彩评论