我正在使用Meteor JS
。流星JS给出错误
在事件中,我写的代码:
console.log(document.getElementsById('email_id').value);
我的代码给错误:
Uncaught TypeError: document.getElementsById is not a function
我不知道知道为什么吗?
我正在使用Meteor JS
。流星JS给出错误
在事件中,我写的代码:
console.log(document.getElementsById('email_id').value);
我的代码给错误:
Uncaught TypeError: document.getElementsById is not a function
我不知道知道为什么吗?
它是document.getElementById
而不是Elements
。
它给出同样的错误:未捕获TypeError:document.getElementByName不是函数 –
它是'document.getElementsByName' 通过类,名称和标记名获取 - 复数。 由id提取 - 奇异。 – kaoskeya
谢谢Kaoskeya!但我在流星JS中使用这个代码,我无法获得textfield的价值。 –
这真的是一个错字? –