On the Google and Yahoo search pages, the URLs of the 10 search result links actually point to google.com or yahoo.com. The URLs have extra arguments that allow google.com
It appears they do the direct opposite of what you have in your example. They have the href="the link" and the onclick event as the tracking function.