Forum Moderators: open
According to Matt Cutts of Google at last year's PubConferences, they will try to retrieve what might be URLs from javascript and check them out if they look like a page that's not already indexed. But this is not a thing you can pretty much count on, like a straight HTML link would be.
However, I have seen pages get indexed that are only available as URLs written in a straightforward manner by document.write(), as well as links that are simple arguments of a js function inside a dropdown menu.
Google won't execute the javascript (that's too dangerous to automate) but they will examine js as text-only to find strings that look like URLs. So if the URL is obscured too heavily by the coding, it may not get noticed.
To be fair though, I can't add up for toffee....
Mind you, I've yet to meet a programmer that could spell either
I can spell eitherr