我一直在尝试让一个javascript页面在iphone上工作时遇到很多问题。因为iphone没有控制台选项我写道:
https://github.com/mctrivia/debugMaster
自己进行测试。然而,即使最简单的页面似乎也不起作用。在我的iphone以外的所有设备的地址栏中使用#test
执行以下代码时会显示Test Test Test Test
。 iPhone显示Should not be visible.
<!DOCTYPE html>
<html>
<header>
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<meta name="viewport" content="width=200, initial-scale=1.0, user-scalable=no">
<script src="/js/jquery.js"></script>
<script src="/js/debugMaster.js"></script>
<script>
$(function() {
debugMaster.log("test");
debugMaster.log("test");
debugMaster.log("test");
debugMaster.log("test");
});
</script>
</header>
<body>
Should not be visible.
</body>
</html>
http://mctrivia.com/test/test.html#test
提供实时页面更新 我一直在做一些测试。
失败: https://jsfiddle.net/mctrivia/a6yjux81/
通过: https://jsfiddle.net/mctrivia/yysphgnb/
所以我知道到目前为止
console.log('test')
,.show
,.append
不是小精灵
答案 0 :(得分:0)
我找到了。 iPhone不允许使用单词let