25 Jan, 2008
Have button (input element) go to new page with onclick
Posted by: Jennifer In: Javascript
This is probably considered "Javascript 101" – but I still had a bit of trouble finding just the right syntax to work. Simply needed a button to open a new page (in the same browser window):
<input type="button" value="THERE REALLY ARE OTHER SEARCH ENGINES!"
onclick="location.href='http://www.yahoo.com'; return false" />
Related posts:
- open_basedir restriction in effect error on WordPress page This is the second time I've run into this problem....
- Multi-Row Carousel and Image Loader with JQuery A recent project I've been working on involved a portfolio...
- Striping IMG tags from the_content in WordPress (and how to fudge page excerpts) Background: For a site I was working on, I was...
Related posts brought to you by Yet Another Related Posts Plugin.
scriptygoddess
