【问题标题】:How to remove "Microsoft' was used before it was defined" jslint error如何删除“在定义之前使用 Microsoft””jslint 错误
【发布时间】:2012-08-30 05:14:54
【问题描述】:

错误:

在定义之前使用了 Microsoft'。

我正在使用 bing MAP API 在我的网页中实现 bing 地图。

var map;
function getMap() {
  map = new Microsoft.Maps.Map(document.getElementById('myMap'), {credentials: 'bing map key'});
}

如何在js文件中使用函数而不出现jslint错误?

【问题讨论】:

    标签: bing-maps jslint


    【解决方案1】:

    从 JSLint 的检查中排除 Microsoft 对象。

    /*global Microsoft: false */
    

    http://www.jslint.com/lint.html

    【讨论】:

      猜你喜欢
      • 2010-10-22
      • 2011-11-17
      • 2012-03-26
      • 2011-11-06
      • 2012-10-09
      • 2014-06-07
      • 1970-01-01
      • 2013-12-18
      • 2017-07-18
      相关资源
      最近更新 更多