ご存知のように、テキストボックスをクリックしているときにテキストボックスのデフォルト値を削除したいのですが、このコードは機能します。しかし、ボックスをクリックしてから、画面の別の部分 (つまり、テキストボックスの外) をもう一度クリックしても、データは戻ってきません。私は何をすべきか?
<html><head><title>(Type a title for your page here)</title>
<script type="text/javascript">
function make_blank()
{
document.form1.type.value ="";
}
</script>
</head>
<body >
<form name=form1 method=post action='test.php'>
<input type=text name=type value='Enter your user id' onclick="make_blank();">Enter User ID
<b>Type</b>
<input type=submit value=Submit> </form>
</body>
</html>