Skip to content

Instantly share code, notes, and snippets.

@JeffCohen
Created June 6, 2012 13:54
Show Gist options
  • Save JeffCohen/2881991 to your computer and use it in GitHub Desktop.
Save JeffCohen/2881991 to your computer and use it in GitHub Desktop.
JS for today
<html>
<head>
</head>
<body>
<script>
function sayWeather() {
alert('It is very nice outside, what are you doing coding in here?');
var e = document.getElementById("jeff");
// e.style.color = "red";
e.style.display = "none";
}
</script>
<a href="http://www.google.com"
onclick="sayWeather(); return false;" >
Click here for the current temperature
</a>
<h1 onclick="alert('This is your list');">
My Favorite Foods
</h1>
<ul id="jeff">
<li>Ice Cream</li>
<li>Cookies</li>
<li>Mars Bars</li>
</ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment