代码示例:(标识:dhtm_event_onselect)
<html>
<head>
<script type="text/javascript">
function message()
{
alert("当您选择输入框中的内容时会触发这个提示框")
}
</script>
</head>

<body>

<p>请选择输入框中的内容</p>
<form>
<input type="text" value="Select this text" onselect="message()" size="20">
</form>

</body>
</html>
运行结果: