function change() {
var t = document.getElementById("text1");
if (t.value != "")
alert("You entered: " + t.value);
else
alert("would you enter some text");
}
what you had wasn't even valid javacript. You should get a book on js and at least learn the basics as it's not a good way to learn to constantly ask people to fix your basic errors.