I have in javascript a text say I am an idiot

I want to do it. "I am...." and on mouseover it shows up I am an idiot.

How can I do it?

This what you're looking for?

<html>
<script>
var hideLength=7;
function showText(el){
	el.innerHTML=el.getAttribute("fulltext");
}
function hideText(el){
	if (el.getAttribute("fulltext").length > hideLength){
		el.innerHTML=el.getAttribute("fulltext").substr(0,hideLength-3)+"...";
	}
}
</script>
<body>
<span fulltext="Test this text." onmouseover="showText(this)" onmouseout="hideText(this)">Test...</span>
</body>
</html>

also i dont wanna use span.I am using inputtext, i want to do it inside textbox

So something like this?

<input type="text" value="Test..." title="Test this text." />