Skip to content

Instantly share code, notes, and snippets.

@xiaody
Created May 13, 2014 14:36
Show Gist options
  • Save xiaody/90055f77792baa6aa90d to your computer and use it in GitHub Desktop.
Save xiaody/90055f77792baa6aa90d to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="this" />
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<a id=asdf>shishi</a>
</body>
</html>
var obj = {
sayThis:function(){console.log(this)}
};
obj.sayThis();
var func = obj.sayThis;
func();
asdf.onclick=function(){
obj.sayThis();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment