Strictly just f.y.i., google's loader https://developers.google.com/loader/ which you would load with a simple script tag:
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
does store info about their best guess about a users location, presumably done via i.p. lookup, within google.loader.ClientLocation object. In fact here's a fiddle example showing your own (supposed) location with a Marker http://jsfiddle.net/pTfM5/2/
It's horribly inaccurate for me, shows me to be an entire state and a couple hundred miles away from where I really am. ipinfodb and ip2location as suggested by Michael C. are a bit more accurate, they show me just two thirds as far away as reality than googles loader does, still off by a long ways.
Maxmind is much better though, only off by about 20 miles