Wednesday, December 16, 2009

Fun with javascript

I know this is nothing new. It's all the fad with bookmarklets. Just type the following in your address bar.
javascript:(function(){alert('hey there')})()

You can start doing some really cool stuff with selectors (replace nav with the id of an element on your page)...
javascript:(function(){alert(document.getElementById('nav').innerHTML)})()

There's lots you can do with this. Maybe I'll post a better example later.

0 comments:

Post a Comment