1
<iframe id=x name=x height="100" style="padding:0px;"></iframe><br>
2
<input type=button onclick=t('UnderLine') value="下劃線">
3
<input type=button onclick=t('bold') value="粗體">
4
5
<input type=button onclick=t('JustifyLeft') value="左對齊">
6
<input type=button onclick=t('JustifyCenter') value="居中對齊">
7
<input type=button onclick=t('JustifyRight') value="右對齊">
8
9
<input type=button onclick=t2() value="增高">
10
<input type=button onclick=t3() value="減少">
11
<script>
12
window.frames["x"].document.designMode="On"
13
//setTimeout('window.frames["x"].document.designMode="On"',200)
14
function t(s)
15
{
16
window.frames["x"].focus();
17
o=window.frames["x"].document.selection.createRange();
18
window.frames["x"].document.execCommand(s);
19
}
20
21
function t2()
22
{
23
var obj=window.frames["x"].frameElement;
24
var height = parseInt(obj.offsetHeight);
25
if (height+100>=100){
26
obj.height=height+100;
27
}
28
}
29
function t3()
30
{
31
var obj=window.frames["x"].frameElement;
32
var height = parseInt(obj.offsetHeight);
33
if (height-100>=100){
34
obj.height=height-100;
35
}
36
}
37
</script>

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37
