循环设置提示

时间:2018-09-12 16:54:42

标签: javascript jquery css settimeout css-grid

我正在网站上使用CSS网格,并在variables中使用淡入和淡出不同的网格元素以及更改边框大小。现在,我需要使网格以连续循环的方式工作-我正在尝试清除超时和添加的样式,然后重新启动此刻的初始功能,我将如何使其正常工作?   开发人员站点为:non-deduced context 和下面的代码:

var a = 1;
var b  = 2;

function x(){
var c = a+b;
a = c;
console.log(c)
}


function y(a, b){
var c = a+b;
var a = c;
console.log(c)

}
y(a,b)
console.log(a)
console.log(b)
x()
console.log(a)
console.log(b)

1 个答案:

答案 0 :(得分:0)

您的代码非常复杂。当然可以用更短的方式写。
但是,如果它对您来说正常工作,我将不再讨论。

所以我认为问题在于在Traceback (most recent call last): File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/flask/app.py", line 2309, in __call__ return self.wsgi_app(environ, start_response) File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/flask/app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/flask/app.py", line 1741, in handle_exception reraise(exc_type, exc_value, tb) File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise raise value File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise raise value File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/mliu/Documents/Development/authlib/example-oauth2-server/website/routes.py", line 69, in authorize grant = authorization.validate_consent_request(end_user=user) File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/authlib/flask/oauth2/authorization_server.py", line 206, in validate_consent_request req = _create_oauth2_request(request) File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/authlib/flask/oauth2/authorization_server.py", line 272, in _create_oauth2_request q.headers File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/authlib/specs/rfc6749/wrappers.py", line 39, in __init__ self.query_params = url_decode(self.query) File "/Users/mliu/.local/share/virtualenvs/authlib-mtpFpWgH/lib/python3.7/site-packages/authlib/common/urls.py", line 64, in url_decode raise ValueError(error % (set(query) - urlencoded, query)) ValueError: Error trying to decode a non urlencoded string. Found invalid characters: {' '} in the string: '...&scope=openid offline_access&...'. Please ensure the request/response body is x-www-form-urlencoded. 函数上运行6000毫秒的循环...

那将是:

playStory()

如果您也想循环var playInterval = setInterval(playStory,6000); // To stop it clearInterval(playInterval);

clearStory()