案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function changeTextDirection()
5
{
6
document.getElementById("p1").style.direction="rtl";
7
}
8
</script>
9
</head>
10
<body>
11
12
<p id="p1">This is some text. This is some text. This is some text.
13
This is some text. This is some text. This is some text.
14
This is some text. This is some text. This is some text.</p>
15
16
<input type="button" onclick="changeTextDirection()" value="Set text to flow from right to left" />
17
18
</body>
19
</html>
20