I have Chrome 16.0.912.63 m. I'm learning js. A simple cookie setting example script works in IE & Firefox but not in Chrome.

Code HTML4Strict:
<a href="javascript: setcookie();">Set Cookie</a><br/>
<a href="javascript: readcookie();">Read Cookie</a>
 
 
<script type="text/javascript">
 
	function setcookie(){
		document.cookie="randomcookietext";
	}
 
	function readcookie(){
		alert(document.cookie);
	}
 
 
</script>

What do I need to do differently in Chrome?