google-chrome - 我在 Chrome 上看到此错误,但在 Firefox 上没有看到
问题描述
我在 Chrome 上看到一个错误,但在 Firefox 上看不到这个错误。
Uncaught TypeError: Cannot read property 'nodeName' of null
at _e (index.js:63)
at MutationObserver.<anonymous> (index.js:63)
我的代码:
<button onclick="typeWriter()">Click me</button>
<p id="demo"></p>
<script>
var i = 0;
var txt = ['var hackedman = world.getUserByIpAdress("32.312.323.320") e','oldu'];
var array = 0
var speed = 50;
function typeWriter() {
if (array < txt.length) {
if (i < txt[array].length) {
document.getElementById("demo").innerHTML += txt[array][i];
i++
}
if (txt[array].length == i) {
document.getElementById("demo").innerHTML += "<br>"
i=0
array++
}
setTimeout(typeWriter, speed)
}
}
</script>
我在https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_typewriter上获得此代码
解决方案
推荐阅读
- vba - MS-Access:使用 vba 移动到 NavigationControl
- spring-boot - 在 Spring Cloud Gateway 预过滤器中获取 SecurityContextHolder
- javascript - 反应渲染数据数组映射
- reactjs - 使用状态钩子计算承诺的内部
- javascript - 有没有办法跟踪 JS 使用 PYTHON / SELENIUM 完成的重定向?
- c++ - 在c ++中返回运算符=重载的对象
- c# - 在c#中检索网页html内容
- html - 如果嵌套元素继承了最大宽度样式,如何使嵌套元素跨越整个屏幕宽度?
- c# - AJAX 在 MVC 中调用 Web 表单
- javascript - 类组件与功能组件渲染内的箭头函数?表现明智