<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>水務繳費/預存</title> </head> <body onload="closeWindow();"> <h1>支付成功</h1> <div id="show"> 將倒計時10秒後關閉當前窗口,返回微信公衆號窗口 </div> </body> <script type="text/javascript"> var time=5; function closeWindow(){ window.setTimeout('closeWindow()',1000); if(time>0){ document.getElementById("show").innerHTML=" 將倒計時<font color=red>"+time+"</font>秒後關閉當前窗口,返回微信公衆號窗口"; time--; }else{ WeixinJSBridge.call('closeWindow'); //this.window.opener=null; //關閉窗口時不出現提示窗口 //window.close(); } }