Him*_*ors 2 javascript jquery constructor
我正在使用jQuery的插件.它在webkit中运行良好,但是当我在firefox中尝试它时,我得到以下firefox错误:
google.maps.Geocoder is not a constructor
$('.to, .from').geo_autocomplete(new google.maps.Geocoder, {
Run Code Online (Sandbox Code Playgroud)
这是所有的jquery:
$('.to, .from').geo_autocomplete(new google.maps.Geocoder, {
mapkey: 'ABQIAAAAbnvDoAoYOSW2iqoXiGTpYBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQNumU68AwGqjbSNF9YO8NokKst8w',
selectFirst: false,
minChars: 3,
cacheLength: 50,
width: 235,
scroll: true,
scrollHeight: 330
});
Run Code Online (Sandbox Code Playgroud)
什么是构造函数和firefox如何指出它?
构造函数是函数(返回函数名称类型的对象),当您new与该函数的名称一起使用时调用该函数,例如:
function Person(name, age) {
//blah
}
var me = new Person("Jacob", 20);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
659 次 |
| 最近记录: |