I have checked with an alert, my value is "Enter your comment...", but my if statement returns false.
Thank you.
function ClearText(e) {
//alert(document.getElementById('contactMe').value);
if (document.getElementById('contactMe').value == 'Enter your comment...') {
document.getElementById('contactMe').value = "";
}
}
var x = document.getElementById('contactMe');
x.addEventListener('click', ClearText, false);
<html>
<body>
<textarea id=contactMe rows=4 cols=40>Enter your comment...</textarea>
<script src="contactBox.js">
</script>
</body>
</html>