Skip to content

Commit

Permalink
if the input type is color, its value cannot be empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil2Wang committed Nov 9, 2013
1 parent e00d207 commit 241b746
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions html/semantics/forms/the-input-element/input-type-color.html
@@ -0,0 +1,26 @@
<!DOCTYPE HTML>
<html>
<head>
<title> New Document </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>

<body onload="changeVal()">
<h1>input element type=color</h1>
<input type="color" id="ipt" />

<script>
function changeVal() {
document.getElementById("ipt").value == "";
}

test(function() {
assert_false(document.getElementById("ipt").value == "");
}, "the value cannot be empty string");

</script>

<div id="log"></div>
</body>
</html>

0 comments on commit 241b746

Please sign in to comment.