Please someone help me check this http://jsfiddle.net/XQy9G/

There are 3 sections on the page.

1. The Html
2. The Javascript
3. The Result

I don't know how to bring the javascript and html together in one page or maybe call the javascript from an onclick event.

Can someone help me out cos i have tried to bring it together but it seems not to work.

Thanks for your help.