增加比赛排名页面的自动刷新

This commit is contained in:
virusdefender
2015-09-08 17:34:21 +08:00
parent 4529ce191c
commit 2334982f31
2 changed files with 10 additions and 1 deletions

View File

@@ -50,6 +50,7 @@
{% endfor %}
</tbody>
</table>
<input type="checkbox" id="auto-refresh" {% if auto_refresh %}checked{% endif %} onchange="if(this.checked){location.href='?auto_refresh=true'}else{location.href=location.href.split('?')[0]}"> 自动刷新
{% else %}
<p>还没有结果</p>
{% endif %}
@@ -60,4 +61,11 @@
{% block js_block %}
{% if auto_refresh %}
<script>
setTimeout(function(){
location.reload();
}, 5000);
</script>
{% endif %}
{% endblock %}