案例:javascript案例     状态:可编辑再运行    进入横版
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function setMinWidth()
5
{
6
document.getElementById("p1").style.minWidth="1000px";
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="setMinWidth()" value="Set min width" />
17
18
</body>
19
</html>
20

 运行结果 
 北美留学生论坛