您现在的位置是:首页 > 电脑技术查询 > web开发

使用innerHtml没反映,该怎么解决

编辑:chaxungu时间:2022-10-02 23:21:33分类:web开发

使用innerHtml没反映
function a()
{
testdiv.innerHtml= " <h1> fda </h1> ";
}

<div name= "testdiv ">
aaaaaaaaaaaaaaaaaaaaaaaa
</div>
<input type= "button " name= "button " onclick= "a() ">

怎么没反映的呢?
它没有提示错误



------解决方案--------------------
innerHTML
not
innerHtml