Using the replace() the currct document will replace with new one.
Click the following button to see the effect.