functioninitbounce (Functop, Funcbottom) {uexwindow.setbounce ("1"); if(!functop &&!)Funcbottom) {Uexwindow.showbounceview ("0", "Rgba (255,255,255,0)", "0"); Uexwindow.showbounceview ("1", "Rgba (255,255,255,0)", "0"); return; } vartop = 0, BTM = 1; Uexwindow.onbouncestatechange=function(type, state) {if(type = = Top && state = = 2) {//Top BounceFunctop (); Uexwindow.resetbounceview ("0"); } if(Type = = BTM && state = = 2) {//Bottom BounceFuncbottom (); Uexwindow.resetbounceview ("1"); } } if(functop) {uexwindow.setbounceparams (' 0 ', ' {' Pulltoreloadtext ': ' dropdown refresh ', ' releasetoreloadtext ': ' Release refresh ', ' loadingtext ': ' Refreshing, please wait '} '); Uexwindow.showbounceview (Top,"Rgba (255,255,255,0)", 1); Uexwindow.notifybounceevent (Top,1); } if(Funcbottom) {uexwindow.setbounceparams (' 1 ', ' {' Pulltoreloadtext ': ' Load more ', ' releasetoreloadtext ': ' Load more ', ' loadingtext ': ' Load, please wait '} '); Uexwindow.showbounceview (BTM,"Rgba (255,255,255,0)", 1);//set the bounce position and effect ([1: Display; 0: Do not display])Uexwindow.notifybounceevent (BTM, 1);//register to receive a bounce event ([0: Do not receive the Onbouncestatechange method callback; 1: receive]) }}
Foreground call
function (type) { uexwindow.setbounce (1); Initbounce (mes,mes); // uexxmlhttpmgr.ondata = onData; // sendpostrequest (); } function mes () { alert (1); }
Note here that the passed parameter is a method, do not pass the parameter, otherwise it will be executed.
Appcan drop-down list refresh