Revision: 15197
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at June 26, 2009 20:12 by adamdecaf
Initial Code
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<p id="hello">
</p>
<p class="goodbye">
</p>
<script>
// Gather the elements
var i = document.querySelector("p#hello");
i.innerHTML = "Hello World";
var j = document.querySelector("p.goodbye");
j.innerHTML = "Good Bye!";
</script>
</body>
</html>
Initial URL
Initial Description
This will only work in FF 3.5 and web-kit browsers. (post 06/20/2009)
Initial Title
JavaScript Query Selector
Initial Tags
html, query
Initial Language
JavaScript