当前位置: 代码迷 >> JavaScript >> JavaScript中this学习,该如何解决
  详细解决方案

JavaScript中this学习,该如何解决

热度:341   发布时间:2013-12-04 17:21:02.0
JavaScript中this学习
学习代码,保留着以备以后看
<html>

<head>

<title>JS?This??</title>

</head>

<body>
<input name="btnName" type="button" value="button"  onclick="introduce();" />
<input name="btnName2" type="button" value="button2"   />
<img src="apple.png" onerror="alert(1);} function hi() { alert(2); " />
<script type="text/javascript">
    var name = "I am Laruence";
    function introduce() {
     alert(this.name);
    }
    alert(window.introduce);
    document.getElementById('btnName2').onclick = introduce;
    dom.onclick = introduce();
</script>
</body>


</html>
Javascript? this

------解决方案--------------------
顶贴~接分~
  相关解决方案