What's your favorite way of testing javascript code snippets?
I like to use the browser's address field directly:
javascript:void(document.getElementById("textbox").style.display='none'))
javascript:void(document.write("Testing"))
javascript:alert(parseFloat("33.33"))
If using the latter trick, don't forget to wrap everything in a void()
call or an alert()
call, lest the page will be blanked out.
Alternatively, there is the Firebug extension on firefox in which you can edit javascript code arbitrarily.
Any other interesting ways out there?