html script代码:<script> $(document).ready(function () { var update = setInterval(function () { $("#1").load('/tools/monitor/time/'); $("#2").load('/tools/monitor/time/'); },1000); });</script>这里我在后台会传一个值lis到前端,想着是这么写:<script> $(document).ready(function () { var update = setInterval(function () { {% for ip in lis %} $("#{{ ip[0] }}").load('/tools/monitor/time/'); {% endfor %} },1000); });</script>这么写不成功,是script内不能这么用for吗?该怎么写这个for语句?
添加回答
举报
0/150
提交
取消