<script type="text/javascript">
var Lists=document.getElementsByTagName("li");
for (var i=0; i<Lists.length;i++)
{
var text=lists[i].getAttribute("title");
document.write(text +"<br>");
if(text=="")
{
lists[i].setAttribute("title","WEB前端技术");
document.write(Lists[i].getAttribute("title")+"<br>");
}
}
题目给的代码是var Lists 你用的是lists,JS中是区分大小写的