window.I = {} var basic=getpath(); jQuery(document).ready(function($) { $('#reg').click(function(){ if(window.op==1) return; window.op=1; var key=$('#key').val(); jQuery.post(basic+'/admin/webinfo/reg.htm?tttidt='+Math.random(), {key: key}, function(data, textStatus, xhr) { //optional stuff to do after success window.op=0; if(data.code==0) { alert('注册成功,起始时间:'+data.stime+";截止时间:"+data.etime+";"); window.location.href=basic+"/login/login.jsf"; }else{ alert(data.errmsg); } }); }); });