Home > Article > Web Front-end > javascript showModalDialog multi-layer modal window code to implement page submission and refresh_javascript skills
In the modal page of layer N (N>1), if you want to link to other pages or refresh the current page, you can only use
window.name = "__self";
window.open(window.location .href, "__self") //Note that two underscores
replace location.href
when you need to close the modal window of the Nth (N>1) layer and refresh the N-1th layer When using a modal page, in order to prevent a new window from popping up when refreshing, you can pass the return value to the N-1 layer modal window through returnValue to confirm whether it needs to be refreshed
In the submit event of the button:
code