已采纳回答 / Alyssa_Lee
改成<input type="button" value="点击我" onclick="contxt()" /> 你的函数是contxt()不是alert()。。。。。。
2014-12-31
最赞回答 / Angel爱美丽
此处 document.getElementById("con") 应该返回的是以"con"为id的p元素,也就是返回一个HTMLParagraphElement对象。
2014-12-30