新手向高手的紧急求救!!

aflash 2002-02-13 03:40:32
先请看一看下面的这段代码:
<span id=span1 style="font-size:16pt">old text</span>
<script language="JavaScript">
alert("about to change the text");
span1.innertext="out with the old and in with the new";
但是,为什么我单击了弹出的警告框后,
span1.innertext="out with the old and in with the new";这句执行后应该改变输出的文本,可是就是只显示“Old Text”,不能变为“out with the old and in with the new"
这究竟是为什么?为什么!!!!
请高手指点一下小弟,不胜感激!!!

...全文
20 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
karma 2002-02-13
  • 打赏
  • 举报
回复
javascript is case-sensitive, try
span1.innerText = "....";

87,904

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧