DOM2级为什么没有弹窗?
求前辈指导,主要代码如下:
<button id="btn">按钮</button>
<script type="text/javascript">
function showMessage(){
alert("hello world!");
}
var btn = document.getElementById("btn");
btn.addEventListener('click','showMessage',false);
</script>
求前辈指导,主要代码如下:
<button id="btn">按钮</button>
<script type="text/javascript">
function showMessage(){
alert("hello world!");
}
var btn = document.getElementById("btn");
btn.addEventListener('click','showMessage',false);
</script>
2015-12-08
举报