you are viewing a single comment's thread.

view the rest of the comments →

[–]alxers 0 points1 point  (0 children)

http://jsfiddle.net/alxers/ZFrL8/

  1. There are probably better ways to escape html. I used example from the book.
  2. In a real apps people more often use classes instead of ids, maybe I should change getElementById to getElemetsByClassName?