section
Extends div
for logicaly related content
article
Extends section
for thing that makes sense by itself
aside
For non-essential extras
figure
For essential extras, supporting material
nav
For navigation elements
function say667() { | |
// Local variable that ends up within closure | |
var num = 666; | |
var sayAlert = function() { alert(num); } | |
num++; | |
return sayAlert; | |
} | |
var sayNumber = say667(); | |
sayNumber(); // alerts 667 |
section
Extends div
for logicaly related content
article
Extends section
for thing that makes sense by itself
aside
For non-essential extras
figure
For essential extras, supporting material
nav
For navigation elements
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
function flipHSpara(btn, para, label) | |
{ | |
var button = document.getElementById(btn); | |
var parastyle = document.getElementById(para).style; | |
label = label || ''; //http://javascript.info/tutorial/arguments | |
if (parastyle.display==='none') | |
{parastyle.display='block'; button.value='Hide ' + label ;} | |
else | |
{ | |
parastyle.display='none'; button.value='Show ' + label; |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Dynasite 2c</title> | |
<meta charset = 'UTF-8'> | |
<link rel="icon" href="favicon.ico"> | |
<script src='ds2c.js'></script> | |
<style> | |
fieldset {border-radius: 5px} | |
</style> |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Dynasite 2d</title> | |
<meta charset = 'UTF-8'> | |
<link rel="icon" href="favicon.ico"> | |
<script src='ds2d.js'></script> | |
<style> | |
fieldset {border-radius: 5px} | |
</style> |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>ds3a</title> | |
<meta charset = 'UTF-8'> | |
<link rel='icon' href='favicon.ico'> | |
<script src='ds3d.js'></script> | |
</head> |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>ds3e</title> | |
<meta charset = 'UTF-8'> | |
<link rel='icon' href='favicon.ico'> | |
<script src='lib/ajaxget.js'></script> | |
<script src='ds3e.js'></script> | |
</head> |
//Atributes | |
window.screen.width; | |
window.screen.height; | |
window.name; | |
window.location; // URL | |
window.document.title; | |
window.document.forms[name]; // Use key to retrieve form | |
window.document.images[name]; // Use key to retrieve image | |
// The images width & height attrs are rw-able |