Create Account | Sign In Browse All Bookmarks

JavaScript: Script-ably Rewriting a Function

0(*_*)0
I've seen a good number of requests in forums for information on getting [Java]Script code, and in some cases, rewriting or altering that code. Well, here it is. When this page loads, a JavaScript nabs the definition for JavaScript function something() and places it in the textarea. You are then free to update and run the function.




How does it work? Here's the code for the above demo: