You can set and read cookies using Javascript, but due to same-origin policies that are present in all modern browsers, it shouldn't be possible for a non-Yahoo domains to read cookies set by Yahoo.
There might be some exception that I'm not aware of, but that would seem like a pretty serious browser security issue.