Refresh ModalDialog a modal dialog box

 

 Several methods Javascript page refresh:
. 1 history.go (0) 
2 location.reload () 
. 3 = LOCATION LOCATION 
. 4 location.assign (LOCATION) 
. 5 document.execCommand ( 'the Refresh') 
. 6 window.navigate (LOCATION) 
. 7 LOCATION .replace (LOCATION) 
. 8 = document.URL the location.href

 

In ModalDialog refresh is not done with a modal dialog box window.location.reload (true); want to refresh the modal dialog box, the following workaround:

 

 

1: <html> showModalDialo window between the <Head> plus <base target = "_ self" >, so that the link on this page are open in this window 
2: page <a> added a hidden tag, such as: <a href="" tyle="display:none"> id="reload" reload </a> 
3: in the JS in the address of the current page is assigned to the href attribute <a> in, and add a random value, the IE not to cache pages to read, execute the click event. 
+ = window.location.href reload.href "Random & =" + Math.random (); 
reload.click (); 

Description: reload is defined tag ID <a>

 

Guess you like

Origin www.cnblogs.com/wuchaofan1993/p/11113039.html