楼主请自行检查下你的代码, container.appendChild(title.);//不知这个点是用途是,很多细节你本可以避免,只看到你的这部分的需求,下面仅是个例子<script language="javascript" type="text/javascript">
function appendIt()
{
var newnode = document.createElement("div");
newnode.style.background = '#3399FF';
newnode.style.width= 60+'px';
newnode.innerText = 'hello world!!';
document.body.appendChild(newnode);
}</script>
</HEAD><BODY>
<button onclick="appendIt();">Append</button>
</BODY>
</HTML>
function appendIt()
{
var newnode = document.createElement("div");
newnode.style.background = '#3399FF';
newnode.style.width= 60+'px';
newnode.innerText = 'hello world!!';
document.body.appendChild(newnode);
}</script>
</HEAD><BODY>
<button onclick="appendIt();">Append</button>
</BODY>
</HTML>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货