我想让人们在尝试在我的网站上订票时排队,尤其是当很多人同时尝试时。
我想知道(假设地)人们是否有办法跳过这个队列并直接预订?
这是代码:
<script type="text/javascript">
var time_done = 263;
var time_retry = 30;
var time_todo = 7786;
var todo_pix = 100;
var done_pix = 0;
var width = 100;
var ppu = 0;
var interval = 0;
function progress_queue()
{
width = document.getElementById('contain').width;
if(time_done > -1)
{
if(!interval)
{
ppu = width / (time_todo+time_done);
update_qtime();
}
interval = (1000*time_todo)/todo_pix;
document.getElementById('done').style.width = parseInt(done_pix) + 'px';
document.getElementById('todo').style.width = parseInt(todo_pix) + 'px';
document.getElementById('jhide').style.visibility = "visible";
todo_pix--;
done_pix++;
if (time_retry > 3) setTimeout('progress_queue()', interval);
}
}
function update_qtime()
{
time_todo--;
time_done++;
todo_pix = time_todo*ppu;
done_pix = time_done*ppu;
setTimeout('update_qtime()', 1000);
}
</script>