--->Diese Seite gibts auch in Deutsch.

Small utilities in JavaScript

Menus, forms or games using JavaScript are rather popular for quite a while. However, it is less known that complete scripts can be used as a URL for a link or in the browser address bar, which provides many possibilities for extending the browser functionality.

The following scriptlets can be added to the favourites or bookmarks. They can be applied to any loaded page. Ready-to-use IE-favourites are available in a ZIP-archive.


One of Operas goodies is the zoom function which allows rescaling a displayed page. Using some javascript IE can do this, too.

The following script magnifies the page by 125%:
Downscaling to 3/4 of the original size is also possible:
Original size is defined as 100%:


One can pass the current URL to another site, e.g. the W3C online HTML validator:



Many pages use borderless tables for layout purposes.

These can be made visible by adding red borders:
javascript:for(j=0;document.all.tags('td')[j];j++){document.all.tags('td')[j].style.setAttribute('border','1px solid red','false')};
The amount of pictures added by using <img> can also be of interest:
javascript:alert('This page contains '+document.images.length+' images');


Counting hyperlinks can be pretty easy:
javascript:alert('This page contains '+document.links.length+' Links');
Sometimes it is hard to find them. The following scriptlet draws red borders around <a> links:
javascript:for(j=0;document.all.tags('a')[j];j++){document.all.tags('a')[j].style.setAttribute('border','3px solid red','false')};


Current IE versions are able to apply image processing to html tags and entire pages.

This script inverts all colors:
For colorblinds or printing purposes take a look at the grayscale image:
The x-ray effect is more like a gadget:
And it is possible to mirror a page horizontally or vertically:
Many thanks to Fabrizio Da Ros for his help in IE6 compatibility issues!
Mail the Author: webmeister@deinmeister.de

Homepage Programming Win32Asm Downloads Software Hardware Cartoons Sitemap