日期:2014-05-16 浏览次数:20502 次
window.onbeforeunload = function (){        
        if(oSwf){
            //alert("true");
            oSwf.js_sendDataTwo();
            //setTimeout("oSwf.js_sendDataTwo()",1); 
            //sleep(2000);
            //alert("sending");
        }
        
        return;
    }
function sleep(numberMillis) { 
   var now = new Date();
   var exitTime = now.getTime() + numberMillis;  
   while (true) { 
       now = new Date(); 
       if (now.getTime() > exitTime)    return;
    }
}