Google 地图 v3 自动刷新 DOM 活动?
我目前正在与 Google 合作Maps API v3 地理编码器工具。
我已将自己的代码插入到一个单独的脚本中,该脚本查询数据源,然后使用结果更新 a 。
当我调试并单步执行代码时,我的 div 会更新,然后它会转到 main.js(位于maps.gstatic.com 上)的这一行:
21R.addDomListenerOnce = function(a, b, c, d) {
var e = R[F](a, b, function() {
evb;
return crc
}, d);
return e
};
R.Q = function(a, b, c, d) {
c = Ne(c, d);
return RF
};
function Ne(a, b) {
return function(c) {
return bhc
}
}
R.bind = function(a, b, c, d) {
return RE
};
R.addListenerOnce = function(a, b, c) {
var d = R[E](a, b, function() {
dvb;
return crc
});
return d
};
R.forward = function(a, b, c) {
return RE
};
R.oa = function(a, b, c, d) {
return RF
};
- 如果我继续单步执行,则很难刷新页面,并且我的 div 更新会丢失。
如何避免这种刷新?
I'm currently working with the Google Maps API v3 Geocoder Tool.
I've inserted my own code in a separate script which queries a data source and then updates a with the results.
When I debug and step through my code, my div is updated and then it goes to main.js (located on maps.gstatic.com) at this line:
21R.addDomListenerOnce = function(a, b, c, d) {
var e = R[F](a, b, function() {
evb;
return crc
}, d);
return e
};
R.Q = function(a, b, c, d) {
c = Ne(c, d);
return RF
};
function Ne(a, b) {
return function(c) {
return bhc
}
}
R.bind = function(a, b, c, d) {
return RE
};
R.addListenerOnce = function(a, b, c) {
var d = R[E](a, b, function() {
dvb;
return crc
});
return d
};
R.forward = function(a, b, c) {
return RE
};
R.oa = function(a, b, c, d) {
return RF
};
- If I keep stepping through, it hard refreshes the page, and my div update is lost.
How do I avoid this refresh?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过大量的试验、错误和黑客攻击,看起来我的问题出在样式表
display: none;
中,稍后在代码中没有更改。我还将按钮从表单中移出,因为担心它可能涉及 HTTP Post。
After a lot of trial and error and hacking, it looks like my problem was in the style sheet
display: none;
not being changed later in the code.I also moved my buttons out of the form in the fear it might have been involved in an HTTP Post.