DOMで項目取得1
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>DOMによる要素の指定</title> <!--[if lte IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!--[if lte IE 9]> <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script> <![endif]--> </head> <body> <h1 id="myid">DOMによる要素の指定</h1> <script> document.getElementById("myid").style.color="#ff0000"; </script> </body> </html>