<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
function get_req_sh_date() {
var myField = document.getElementById("myV");
if (!myField || myField.value === "") {
return "[Requested Ship Date]";
}
return myField.value;
}
function doClick() {
document.writeln(get_req_sh_date());
document.writeln('<br/>');
}
</script>
</head>
<body>
<input type="date" id="myV" />
<input type="button" id="test" value="test" onclick='doClick();'/>
</body>
</html>