Posted by Vince Morgan on 12/12/06 09:33
"sally jo" <westsidesally@gmail.com> wrote in message
news:1165872853.396841.91850@j44g2000cwa.googlegroups.com...
> What is the code that you use to put words int he input box that
> disappear when the user starts typing??
>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title></title>
<script type="text/javascript">
function doSelect(obj) {
obj.focus();
obj.select();
}
</script>
</head>
<body onload="doSelect(document.getElementById('inp1'));">
<div>
<input id="inp1" value="This is the text."/>
</div>
</body>
</html>
HTH
Vince Morgan
[Back to original message]
|