I'm new to javascript. My code (in the head section) below is not working for some reason. I know the problem is in the line " if (lfckv == 'true') " . It says "NOT ticked" when I check or uncheck the checkbox.

Code:
 <script>
            function exefunction(){
                var lfckv = document.getElementById("lifecheck").checked;
                if (lfckv == 'true')
				{
				alert("ticked");
				}
				else
				{
				alert("NOT ticked");
			}
			}
				</script>
My HTML code:

HTML Code:
<input type="checkbox" name="tag" value="tag"  id="lifecheck"  onclick="exefunction()"/> Tag this message