简体   繁体   English

旧版FBJS导致错误

[英]Legacy FBJS causing errors

I'm having trouble with some old legacy FBJS. 我在使用一些旧的FBJS时遇到问题。 To validate the value of a field I was using 为了验证我使用的字段的值

document.getElementById('email2').getValue()

This is now giving me the error 现在这给了我错误

Error: a197943730232760_document.getElementById("email2") is null

I'm getting this for any other fields, getChecked() is also failing. 我在任何其他字段上都遇到了这个问题,getChecked()也失败了。 I can't seem to find any other problems and this has only stopped working. 我似乎找不到任何其他问题,而且这只是停止了工作。

Any help would be appreciated. 任何帮助,将不胜感激。

I'm not sure this looks like a FBJS problem. 我不确定这看起来像是FBJS问题。 Check you do actually have an element with the ID 'email2', from the sounds of that error message, your page doesn't have an 'email2' at all, which is why it can't get the value. 根据错误消息的声音,检查您是否确实具有ID为'email2'的元素,您的页面根本没有'email2',这就是为什么它无法获取值的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM