我已经尝试了 3 个小时来让我的 Alertify JS 代码正常工作。我需要这些函数彼此紧随其后,并使提示的答案成为我可以在另一个函数中使用的全局变量。当我运行它时会发生什么,它会执行第一个提示,但我不执行任何其他提示。我对编码还是很陌生,我敢打赌我做了一些愚蠢的事情。这就是我所拥有的。
function appchange() {
alertify.prompt("Enter the number of the app you want to change. From left to right, 1-5.", ' '
, function(evt, a) { numb = a;
linkURL();
});
}
function linkURL() {
alertify.prompt("Enter the link you want the app to go to.", 'https://'
, function(evt, b) { url = b;
iconHTML();
});
}
function iconHTML() {
alertify.prompt("Enter the html of the icon from fontawesome.com/icons or you can use a capitol letter. CAN NOT BE A PRO ICON!", ' '
, function(evt, c) { icon = c;
finish();
});
}
function finish() {
}
如果有人可以解决我做错的事情,那就太棒了。谢谢!