<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head>
<card title="Microsoft JScript 运行时异常: 'document.getElementById(.)' 为空或不是对象 " id="card1">
<p> 游客</p><p>
标题:Microsoft JScript 运行时异常: 'document.getElementById(.)' 为空或不是对象 <br/>
正文:<br/>
求助：Microsoft JScript 运行时错误: 'document.getElementById(...)' 为空或不是对象!<br/>无刷新输出结果的时候出现在下面的错误： <br/> Microsoft   JScript   运行时错误:   'document.getElementById(...) '   为空或不是对象 <br/> <br/> 应该怎么办呀？<br/><br/>------解决方案--------------------<br/>你检查下你的页面里有没 ID 为 context的 <br/>------解决方案--------------------<br/>document.getElementById ( &quot;context &quot;).innerHTML =rValue; <br/>------解决方案--------------------<br/>context 是你要传的控件的ID 请问你要传的控件都在 页面本身中吗?还是在其他控件中 <br/> 引用到本页的,或者是嵌套到 datalist或gridview或dategrid里的那的 <br/> 如果是的 从别的控件引用或者嵌套的话 都需要加 控件名_ID名 <br/> <br/>------解决方案--------------------<br/>alert(context) 先输出看看 <br/>------解决方案--------------------<br/>引号 <br/>------解决方案--------------------<br/>document.getElementById () 括号里边要有双引号 <br/>------解决方案--------------------<br/>是不是这个控件的visible= &quot;false &quot;呀 <br/>------解决方案--------------------<br/>你怎么调用这脚本 <br/>------解决方案--------------------<br/>客户端就没有你要得到的id= &quot; &quot;这个属性值，或者是在你调用的时候还没有生成 <br/>------解决方案--------------------<br/>不知道你问题是否解决！但是如果没有解决的话~++<br/><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=784&amp;Page=1">[&lt;&lt;]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=784&amp;Page=1">[[1]]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=784&amp;Page=2">[2]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=784&amp;Page=2">[&gt;&gt;]</a><br/>
<br/>
<a href="wap.asp?act=Com&amp;id=784">查看评论(0)</a><br/>
<a href="wap.asp?act=AddCom&amp;inpId=784">发表评论</a><br/><br/>

<br/>

<br/>
<a href="http://camnpr.com/wap.asp">首页</a>
</p>
</card>
</wml>