Q
question.boy
I'm am trying to validate my HTML and got the following error
regarding a small javascript segmentin my code
Line 149, Column 40: character "<" is the first character of a
delimiter but occurred as data.
function y2k(number) { return (number < 1000) ? number + 1900 :
number; }
The entire segment is as shown below
<script type="text/javascript" language="javascript">
function y2k(number) { return (number < 1000) ? number + 1900 :
number; }
var today = new Date();
var year = y2k(today.getYear());
document.write(year);
</script>
What do I need to do to fix this error? I'm a little confused that it
is flagging a < symbol inside a javascript function.
Thank you in advance for your advice,
QB
regarding a small javascript segmentin my code
Line 149, Column 40: character "<" is the first character of a
delimiter but occurred as data.
function y2k(number) { return (number < 1000) ? number + 1900 :
number; }
The entire segment is as shown below
<script type="text/javascript" language="javascript">
function y2k(number) { return (number < 1000) ? number + 1900 :
number; }
var today = new Date();
var year = y2k(today.getYear());
document.write(year);
</script>
What do I need to do to fix this error? I'm a little confused that it
is flagging a < symbol inside a javascript function.
Thank you in advance for your advice,
QB