跨域ajax访问和js sleep

青盲 2012-04-23

function check(choice,serviceID){

varurl="<%=url1%>";

varurl2="<%=url2%>";

varstat=document.createElement("<imgid='stat'src='"+url2+"'style='display:none;'/>");

varstat2=document.createElement("<imgid='stat1'src='"+url+"'style='display:none;'/>");

document.body.insertBefore(stat);

document.body.insertBefore(stat2);

varopinion=document.getElementById("opinion").value;

opinion=encodeURI(opinion);

opinion=encodeURI(opinion);

varserviceIdName=document.getElementById("serviceIdName").value;

varnow=newDate();

varexitTime=now.getTime()+10000;

while(true){

now=newDate();

if(now.getTime()>exitTime){

location.href="decisionSubmit.action?serviceid="+serviceID+"&choice="+choice+"&decision="+opinion+"&serviceIdName="+serviceIdName;

return;

}

}

相关推荐

mmywcoco / 0评论 2020-06-06