我需要 Js 中此代码的帮助。此示例:let friends = ["Ahmed", "Sayed", "Ali", 1, 2, "Mahmoud", "Amany"];let index = 0;let counter = 0;// // Output// "1 => Sayed"// "2 => Mahmoud"while(index < friends.length){index++;if
2021-09-24
我在 wordpress 上有不同的部分,我想显示一个按下相应按钮的部分。按钮“红色”打开“红色部分”,其他颜色消失,然后继续。这是我编写的代码,它是“未捕获的类型错误:无法读取 null 的属性(读取‘样式’)”,你能帮助我吗?/*gets the section ids*/var vermelho = document.getElementById("vermelho");var laranj
2021-09-22
create or replace procedure test_09172(c_custkey varchar(25),c_mktsegment varchar(25),cname varchar(25)) returns string not null language javascript execute as owner as $$var sqlquery="";var f
2021-09-21
我尝试从 commerceJS API 访问从不同模块获取并作为 prop 传递的数据,只有当我调用嵌套产品对象时,代码才会中断,并出现此错误Uncaught TypeError: Cannot read properties of undefined (reading 'source')。我在店面上使用了相同的 API,{product.media.source运行正常。我正在尝试制作一个预览模
2021-09-21
我非常感谢有关此代码的帮助。它在Google表中工作了,但突然开始出现错误消息。完整的代码如下:457540079849133400代码> 230383815
2021-09-15
Uncaught TypeError: Cannot read properties of undefined (reading 'length')Error is showing in react-dom-development.js file[1]: https://i.sstatic.net/6a8tF.png[2]: https://i.sstatic.net/Cn3EP.png每当我从子
2021-09-15
我想在 QGIS2web 插件生成的 OpenLayers 地图中绘制特征。由于一切似乎都很好,并且所有功能现在都已推出,与最近的情况不同。我的完整代码在这里:https://jsfiddle.net/go39r4j7/但我对情况不太确定,因为我一直收到错误:TypeError:无法读取 null 的属性(读取“get”)指出了以下一段代码:map.forEachFeatureAtPixel(pi
2021-09-15
查看文档https://laravel-livewire.com/docs/2.x/events#from-js在 javascript 中使用 Livewire 组件<script>Livewire.emit('postAdded')</script>我不明白 Livewire 是什么?声明的 var?我如何获取它。我需要从 JS 代码中获取某些 var 的值并运行组件方法。我该怎么做?修改后的
2021-09-11
我正在尝试创建一个矩阵类。当我将cof()函数用作方法时,该函数不起作用并显示此错误。practice:47 Uncaught TypeError:无法读取未定义的属性“cof”。但是当我在det()方法中将其用作函数时,它运行正常。有人能解释为什么会发生这种情况吗?class Matrix{constructor(matrix){this.matrix = matrix}cof(matrix =
2021-09-06
我将播放器上传到服务器时出现此错误,因为在本地它可以正常工作。让我解释一下,播放器在本地显示正在播放的歌曲、即将播放的歌曲和已经播放的歌曲,但在上传到服务器时出现以下错误:Uncaught TypeError:无法读取未定义的属性(读取“replace”)在以下代码行中,但我不太明白为什么。我想知道您是否可以指导我完成这个项目并交付它,提前谢谢您。let song = data.currentSo
2021-09-06
我收到错误expect(jest.fn()).toHaveBeenCalledWith(...expected)调用次数:0。代码:There is a component on submitting * as form value it will call formik on submit which willcall api asyncronouslyand storing data in
2021-09-05
我正在使用 webpack,在浏览器中收到此错误:Uncaught TypeError: Cannot read properties of undefined (reading 'split')at eval (validator.js:15)at Object../node_modules/axios/lib/helpers/validator.js (main.bundle.js:1225)
2021-09-05
class Calculator {constructor(previousOperandTextElement, currentOperandTextElement) {this.previousOperandTextElement = previousOperandTextElementthis.currentOperandTextElement = currentOperandTextEle
2021-09-04
我正在自学编码,学习 Java Script。我正在研究一本书上的一个问题,我需要为自定义对象创建一个迭代器,它的作用类似于 Set。当我想访问我已设置的用于保存 next() 方法中数据的数组时,我收到以下错误:未捕获的 TypeError:无法读取未定义的属性“length”at Object.next (testerBook.js:34)at testerBook.js:83在 next()
2021-09-03