function getTxt()
{
var newHtml = window.frames[0].document.getElementById("editor").innerHTML;
var creatHtml = document.createElement("div");
creatHtml.id="comments";
creatHtml.innerHTML = newHtml;
document.getElementById("commentsLists").appendChild(creatHtml);
}如上面:我动态在原有的页面上创建了新的元素。当我刷新时 之前创建的元素 全没了。小弟想问问 怎么在当前页面保存 新建的这些元素呢啊。
{
var newHtml = window.frames[0].document.getElementById("editor").innerHTML;
var creatHtml = document.createElement("div");
creatHtml.id="comments";
creatHtml.innerHTML = newHtml;
document.getElementById("commentsLists").appendChild(creatHtml);
}如上面:我动态在原有的页面上创建了新的元素。当我刷新时 之前创建的元素 全没了。小弟想问问 怎么在当前页面保存 新建的这些元素呢啊。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货