document.getElementById("id").innerHTML = (showinfo);//IE8不支持. 可以用Jquery来解决这个问题: $('#id').html(showinfo);