案例:HTML DOM案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function message()
5
{
6
alert("当您选择输入框中的内容时会触发这个提示框")
7
}
8
</script>
9
</head>
10
11
<body>
12
13
<p>请选择输入框中的内容</p>
14
<form>
15
<input type="text" value="Select this text" onselect="message()" size="20">
16
</form>
17
18
</body>
19
</html>
20