当使用 Light Tables 运行我的 JavaScript 程序时,我尝试使用“prompt”命令提示用户输入。我收到错误错误:prompt() is and will not be support.
但我知道这是可能的,因为有人使用它的视频。我必须使用提示命令。我是否缺少某个插件或扩展?
var subTotal = prompt("Enter a sales sub-total.");
subTotal = parseFloat(subTotal);
var salesTax = prompt("Enter a tax rate.");
salesTax = parseFloat(salesTax);
var grandTotal = subTotal * salesTax;
alert("Sub-total: " + subTotal + " Sales Tax: " + salesTax + " Grand Total: " + grandTotal );
最佳答案
关于javascript - 如何在 Light Tables 中使用 javascript 提示用户输入?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39318548/