SyntaxFix
Write A Post
Hire A Developer
Questions
Here it is using jQuery. See it in action at http://jsfiddle.net/sQnSZ/
<button id="x">test</button> $('#x').click(function(){ location.href='http://cnn.com' })