<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 6 年前。
标签 javascript html css mobile
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 6 年前。
我的网站在桌面上查看时运行良好,但在移动设备上查看同一网站时,按钮不起作用。
然而,他们在以前的版本中工作。我几乎没有更改 HTML/CSS,主要处理页面的 JavaScript。
相关网站:http://www.bodmascalc.com
我也知道有一些错误,而且代码并不令人惊奇。我只是在寻找关于为什么在通过移动设备查看时按钮不起作用的建议。
谢谢
最佳答案
您必须修复您的power
功能。我检查了控制台,**
抛出了一个错误。我将其替换为内置的 Math.pow
函数。祝你好运!
function power(sum, b) {
writeSumPart(sum);
b = sum.split('^');
tempAnswer = Math.pow(b[0], b[1]);
writeTempAnswer(tempAnswer);
return Math.pow(b[0], b[1]);
}
关于javascript - 通过手机查看时网站按钮不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41082053/