aboutsummaryrefslogtreecommitdiffstats
path: root/tests/html/color-change-text.html
blob: 261552d667abcf9a3871ea0640134abafbd8638c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<style>
.red  { color: red;  }
.blue { color: blue; }
</style>
<script>
window.setTimeout(function () {
    window.document.getElementsByTagName('div')[0].setAttribute('class', 'blue');
    window.document.getElementsByTagName('div')[1].setAttribute('style', 'color:red;');
}, 1000);
</script>
</head>
<body>
    <div id="change" class="red">Hello, World!</div>
    <div id="change" style="color:blue;">Hello, Servo!</div>
</body>
</html>