<html>
<head>
<script type="text/javascript">
function message()
{
document.getElementById('demo').innerHTML = "这个提示内容由 onfocus 事件句柄触发";
}
</script>
</head>
<body>
<form>
请输入您的名字:<input type="text" onfocus="message()" size="20">
</form>
<p id="demo"> </p>
</body>
</html>