From 7613be5997add20b06a12ea5d1fcec957ccdd0b5 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Thu, 19 Dec 2019 20:21:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=94=AE=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine.html | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/machine.html b/machine.html index bd13876..f0b736b 100644 --- a/machine.html +++ b/machine.html @@ -140,17 +140,15 @@ if( array[i].input.indexOf(value) > -1 ){ flag = true; answer = '

'+array[i].output+'

'; - continue; + setTimeout(function(){ + $(".b_body").append(answer); + $(".b_body").scrollTop(10000000); + text.val(''); + },500); + return; } } - if(flag){ - setTimeout(function(){ - $(".b_body").append(answer); - $(".b_body").scrollTop(10000000); - },500); - }else{ - ajax(args); - } + ajax(args); $(".b_body").scrollTop(10000000); text.val(''); }