2015-06-20 113 views
-2

为什么这个函数不能在greasemonkey中工作。为什么这个函数不能在greasemonkey上工作

function arre(){ 
    var index; 
    var fruits = ["Banana", "Orange", "Apple", "Mango"]; 
    for (index = 0; index < fruits.length; index++) { 
     window.alert(fruits[index]); 
    } 
} 
+4

什么是不工作?请更具体一些。我把我的玻璃球留在家中。 :-) – Ionic

+0

我忘了调用这个函数,是编程的新手。 –

回答

0

您刚刚声明了函数,但没有调用它。 只是添加到末尾:

arre();

+1

是的,也许他忘了叫它。但也许他曾打过电话并发生错误。他应该为所有其他读者提供一些反馈,使其更具体。 :-) – Ionic

相关问题