Microsoft JScript运行时错误:'document.getElementById(...)'为null或不是对象 [英] Microsoft JScript runtime error: 'document.getElementById(...)' is null or not an object

查看:61
本文介绍了Microsoft JScript运行时错误:'document.getElementById(...)'为null或不是对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个位置,第一个位置有5个用户控件,当我将数据从位置1复制到位置2时没关系,但是一旦我在位置2中保存数据并尝试先选择...

I have two locations, in that 1st location has 5 user controls, when am copying data from location 1 to location 2 it is ok, but once i go save data in location 2 and trying to select first...

Microsoft JScript runtime error: 'document.getElementById(...)' is null or not an object

推荐答案

Quote:

Microsoft JScript运行时错误:'document.getElementById(...)'为null或不是对象

Microsoft JScript runtime error: 'document.getElementById(...)' is null or not an object

你有没有提供太多细节和代码来查看。我仍然想对错误给你一些想法。



如果文件中没有元素,则总会出现此错误。当你试图获取Element时,它表示该对象为null,因为它不存在。



如果你动态创建Element,那么请确保你正在尝试这个元素创建后的代码和正确的事件内部。



希望这可以帮助您解决问题。

You have not provided much detail and codes to look at. Still I would like to give you some idea on the error.

This error always comes, if the Element is not present inside the Document. When you try to get the Element, it says that object is null as it is absent.

If you creating the Element dynamically, then make sure that you are trying this code after the Element is created and inside the correct event.

Hope this helps you to resolve the issue.


这篇关于Microsoft JScript运行时错误:'document.getElementById(...)'为null或不是对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆