日期:2014-05-16  浏览次数:20405 次

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

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