blob: 17b9f58e2b5223dc0c7838e5bf0b09276df8fce6 [file] [log] [blame]
<html>
<head>
</head>
<body>
<form>
<textarea id="noDefaultText"></textarea>
<textarea id="hasDefaultText">Default Text</textarea>
<input id="resetButton" type="reset">
</form>
<p>This test verifies that textarea controls are properly reset.<br>You should see two element IDs below, and the word "SUCCESS" twice:<script>
function test(element)
{
var result = "FAILED";
if (element.value == element.defaultValue)
result = "SUCCESS";
document.write("<br>" + element.id + ": " + result);
}
var noDefaultText = document.getElementById("noDefaultText");
var hasDefaultText = document.getElementById("hasDefaultText");
noDefaultText.value = "Not the default value.";
hasDefaultText.value = "Not the default value.";
document.getElementById("resetButton").click();
test(noDefaultText);
test(hasDefaultText);
</script>
</body>
</html>