It shows error because your anim.js path is false
<script type="text/javascript" src="anim.js" ></script>
and image are also not avilable ,so please properly put all your supporting files in your project folder and then run ,don't try in w3schools