只显示在google.maps.event.addListener街道地址() [英] show just the street address in google.maps.event.addListener()
本文介绍了只显示在google.maps.event.addListener街道地址()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我写了一个小功能,将使用 google.maps.event.addListener()
获取用户的地址。这里是的jsfiddle 。
I have written a small function that will get the user address using the google.maps.event.addListener()
. Here is the jsFiddle.
一切正是我想要的,除了当用户输入完然后从街道
字段集中了,我只是想在<$ C $街道地址C>输入。
Everything is exactly what I want, apart from when the user finishes typing and focus out from the street
field, I just want the street address in the input
.
目前,它看起来像这样:
At the moment it looks like this:
但我想它是这样的:
由于已经寻求帮助。干杯。
Thanks already for help. Cheers.
推荐答案
使用一个短暂的延迟申请的StreetAddress
Use a short delay to apply streetAddress
setTimeout(function(){$('#address').val(streetAddress);},50);
这篇关于只显示在google.maps.event.addListener街道地址()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文