Created
October 10, 2014 10:06
-
-
Save cheng470/2475f9b364d6bfe68e81 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/xiceq/1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="myId"></div> | |
<script id="jsbin-javascript"> | |
alert(myId.id); // --> myId | |
alert(window.myId.id); // --> myId | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">alert(myId.id); // --> myId | |
alert(window.myId.id); // --> myId</script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert(myId.id); // --> myId | |
alert(window.myId.id); // --> myId |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment