tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / css / selector-set-attribute.html
1 <html>
2 <head>
3 <title>setAttribute() Test</title>
4
5 <style type="text/css" title="text/css">
6
7     p { display:none; color: red; }
8     p[title] { display:block; color: green; }
9     p[id] { display:block; color: green; }
10     p[class] { display:block; color: green; }
11     p[lang] { display:block; color: green; }
12
13 </style>
14
15 <script type="text/javascript">
16     window.onload = init;
17     
18     function init() 
19     {
20         document.getElementsByTagName('p')[0].setAttribute('class','test');
21         document.getElementsByTagName('p')[1].setAttribute('id','test');
22         document.getElementsByTagName('p')[2].setAttribute('title','This is a test');
23         document.getElementsByTagName('p')[4].setAttribute('lang','en');
24     }
25 </script>
26
27 </head>
28 <body>
29     <h1>setAttribute() Test</h1>
30     <p>
31         This element's Class attribute is set using setAttribute(). It should be green.     
32     </p>
33     <p>
34         This element's ID attribute is set using setAttribute(). It should be green.        
35     </p>
36     <p>
37         This element's Title attribute is set using setAttribute(). It should be green.     
38     </p>
39     <p title="This is hard-coded">
40         This element's Title attribute is hard-coded. It should be green.       
41     </p>
42     <p>
43         This element's Lang attribute is set using setAttribute(). It should be green.     
44     </p>
45 </body>
46 </html>