<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript" src="js/jquery-3.3.1.js" ></script> <script> //模拟从后台返回的数据 var data=[ { id: "one", name: "小明", department: "儿科", position: "主任医师,科主任", description: "小明的介绍小明的介绍小明的介绍小明的介绍小明的介绍" } ]; </script> </head> <body> <div id="muban"> <ul id="ml"> </ul> </div> <script> for(var i = 0;i < data.length;i++){ var a = "<li>姓名:" + data[i].name +"</li>"; document.getElementById("ml").append(a); } </script> </body></html>小白,不知道为什么运行起来会出现如下错误提示:[Web浏览器] "Uncaught TypeError: undefined is not a function" /myTest/new_file.html (28)谢谢。
添加回答
举报
0/150
提交
取消