Head First HTML5 Programming
Building Web Apps with Javascript
(O'Reilly Media)
Eric Freeman (著), Elisabeth Robson (著)
開発環境
- OS X Yosemite - Apple (OS)
- Safari, Firefox, Google Chrome(Webプラウザ)
- Emacs (CUI)、BBEdit - Bare Bones Software, Inc. (GUI) (Text Editor)
- HTML5 (マークアップ言語)
- JavaScript (プログラミング言語)
Head First HTML5 Programming: Building Web Apps with Javascript(Eric Freeman (著)、Elisabeth Robson (著)、O'Reilly Media)のChapter 2(Introducing JavaScript and the DOM: A Little Code)、SHARPEN YOUR PENCIL(No. 1591)を解いてみる。
その他参考書籍
SHARPEN YOUR PENCIL(No. 1591)
HTML5 (BBEdit, Emacs)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>MyPlayList</title>
<script>
var addSongs = function() {
var song1 = document.getElementById('song1'),
song2 = document.getElementById('song2'),
song3 = document.getElementById('song3');
song1.innerHTML = 'Blue Suide Strings, by Elvis Pagely';
song2.innerHTML = 'Great Objects on Fire, by Jerry JSON Lewis';
song3.innerHTML = 'I Code the Line, by Johnny JavaScript';
};
window.onload = addSongs;
</script>
</head>
<body>
<h1>My awesome playlist</h1>
<ul id="playlist">
<li id="song1"></li>
<li id="song2"></li>
<li id="song3"></li>
</ul>
</body>
</html>
0 コメント:
コメントを投稿