1
Is there any method that makes a function run after a certain time? What I need is for the function below to run after a period of time, because the ID it searches for is only available after a time we are on the page.
var func = document.getElementById('olvideo_html5_api').src;
alert(func);
window.location.href = +func
The function of capturing the ID worked perfectly, but could not redirect the site to the captured link.
– Diego Queiroz
The first method is more interesting because of its second to millisecond converter.
– Diego Queiroz
@Diegoqueiroz His mistake was in
window.location.href = +func;
... See the correction I made in the reply:window.location.href = func;
– Sam
It worked perfectly, I thought that in every variable link manipulation it was necessary the "+" before the same.
– Diego Queiroz