From 3af257eb77c794df27a5d90328e442688c7cba1a Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 25 Mar 2016 15:18:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E6=B5=8B=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E6=9C=89=E9=97=AE=E9=A2=98=E6=97=B6=E5=BE=97=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/homework.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index ca120df2f..f488465ca 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -92,7 +92,14 @@ $(function(){ test_post(i+1); } - ); + ).fail(function(xhr, status){ + if(status == 'timeout'){ + alert("您的答案超时了, 请检查代码是否存在死循环的错误."); + } else { + alert("测试失败,服务器出错."); + return; + } + }); }; test_post(1);