首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

模态窗口中,防止交付时页面刷新弹出新的页面

2012-07-04 
模态窗口中,防止提交时页面刷新弹出新的页面?Next check to see if your modal dialog now correctly refr

模态窗口中,防止提交时页面刷新弹出新的页面

?


Next check to see if your modal dialog now correctly refreshes itself.In some cases the modal dialog will still open a new window. For instance if you were using a JavaScript self.location.href= command then you will need to replace this with a simulated hyperlink click event. To do so, add a hyperlink to your page that is styled to be invisible (ie: <a href=”" id=”goLocation” style=”display:none;”>). Then replace your JavaScript self.document.location.href = ‘test.html’; with a click command to your hidden hyperlink as follows:
document.getElementById('goLocation').href = 'test.html';document.getElementById('goLocation').click();

参考 :http://jwcooney.com/2011/12/22/showmodaldialog-opens-a-new-window-on-submit-or-location-href/

?

参考 :http://blog.sina.com.cn/s/blog_4c6e822d0100r6jr.html


热点排行