topical media & game development
mashup-flickr-01-examples-ex1-4.htm / htm
<html>
<head>
<title>Arithmetic</title>
<script type="text/javascript">
function showAnswer()
{
var answerNode = document.getElementById('answer');
answerNode.innerHTML = "<h2>Answer</h2><p>" + (2 + 2) + "</p>";
}
</script>
</head>
<body>
<h1>Question</h1>
<form onsubmit="showAnswer(); return false;">
<p>
What is the answer to the sum <code>2 + 2</code>?
</p>
<input type="submit" value="Show Answer" />
</form>
<div id="answer">
The answer will appear here
</div>
</body>
</html>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.