GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — JavaScriptNotes/JS高级06.md at master · 7256/JavaScriptNotes

Expand file tree

/

JS高级06.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
41 lines (34 loc) · 511 Bytes
/

JS高级06.md

Copy path

File metadata and controls

41 lines (34 loc) · 511 Bytes
Raw
Copy raw file
Download raw file
Edit and raw actions

JS高级06.md

var a = 1;
var func1 = function(){
    var b = 2;
    var func2 = function(){
    var c = 3;
    console.info(b);
    console.info(a);
}
    func2();
    console.info(c);

}
func1();
<html>
<body>
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>

<script>
var nodes = document.getElementsByTagName('div');
for (var i = 0,len = nodes.length;i<len;i++){
    nodes[i].onclick = function(){
    alert(i);    
}
};
</script>
</body>
</html>
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.