我正在使用maven开发Jenkins插件的JavaScript部分,以下是我的代码:
function arrayElements(element, index, array)
{
var arrayPaths = element.split("\\");
var projectSource = arrayPaths[2];
var array = element.split("_");
if (projectSource === global ) {
if (array[2]===filtro){
document.getElementById("source").options.add(new Option(arrayPaths[3], element));
}
}
}
function fillCompiledSource(object, projects)
{
document.getElementById("source").innerHTML = "";
global = document.getElementById("branches").value;
projects.forEach(arrayElements)
}
var projects = new Array();</script><script>
function fillCombo()
{
document.getElementById("source").innerHTML = "";
global = document.getElementById("branches").value;
var array = document.getElementById("branches").value.split('/');
global = array[1];
projects.forEach(arrayElements)
}
这个问题只在Internet Explorer中出现,而且只有在文档模式为IE8标准时才会发生。我不知道原因是什么以及如何解决它。
Pd:Internet Explorer版本为10。
forEach
方法。 - tymeJV