Jquery的img附加在UL下的代码是:
//增加到UL后面
var liObj = $("<li>").attr("id", "topic");
var imgObj = $("<img>").attr("src", "images/" + sessionStorage.getItem("Topic" + SubjectNumber) + ".png");
//添加到画面上的UL标签里
liObj.append(imgObj).appendTo("#UlContent");
img附加在div下的代码是:
var result = "images\\" + RandGetVoluation() + ".png";
var imgObj = $("<img>").attr("src", result);
imgObj.appendTo("#voluation");